Giter VIP home page Giter VIP logo

Comments (2)

jonjanego avatar jonjanego commented on August 15, 2024

Hi @andreas-borglin - that's correct, this action only reviews diffs between commits to the default branch, because it also relies on data that's only in the dependency graph for the repo, which is only created for the default branch.

Thanks for using the action!

from dependency-review-action.

andreas-borglin avatar andreas-borglin commented on August 15, 2024

Hi again.

Sorry but this doesn't seem quite right to me. The dependency submission API allows for dependency information to be submitted for any git reference, and from that, the dependency review API can then be used to get a diff of the dependencies between any two submitted snapshots associated with any git refs in the repo. This is described in the GitHub docs and can be easily verified via the APIs. There is no dependency on the default branch for the APIs.

This action uses the latter API as per https://github.com/actions/dependency-review-action/blob/main/src/dependency-graph.ts#L28-L35.

Hence, if dependency snapshots have been submitted via the dependency submission API for any target branch, and for any source branch with a PR targeting the target branch, then this action does work as expected. We have tested this action fairly extensively now with non-default branches and it works as we'd expect.

But yes, if the dependency submission API is not used, then this would only work against the default branch as that is the only branch that is reported to the graph automatically via dependabot. However the README does not make this clear.

Thanks, Andreas

from dependency-review-action.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.