Giter Site home page Giter Site logo

Comments (9)

febuiles avatar febuiles commented on September 26, 2024 4

Actually both PRs already contain documentation, 2.1.0 has been released with support for other event types!

If you see something behaving funny please open a new issue.

from dependency-review-action.

febuiles avatar febuiles commented on September 26, 2024 2

Thanks for the insight @Aaronkala! Maybe it'd make sense to add extra optional parameters to the Action so it accepts head/base revisions. Leaving this open while considering other options (PRs to mitigate this issue in the meantime are welcome!)

from dependency-review-action.

Aaronkala avatar Aaronkala commented on September 26, 2024 1

We would love to have this also. We we're trying to enable the github merge queue but due to the actions running on push this wasn't possible.

The options we currently have are:

  • Stop requiring the dependency-review action as a "needed check"
  • Don't use merge queue

from dependency-review-action.

Aaronkala avatar Aaronkala commented on September 26, 2024 1

To me it looks like the head_ref and base_ref are only available on pull_request or pull_request_target events.

repo and owner should be available in all

From the docs: https://docs.github.com/en/actions/learn-github-actions/contexts#github-context

from dependency-review-action.

febuiles avatar febuiles commented on September 26, 2024 1

Thanks to the amazing work by @WillDaSilva the Action should now support event types different to "pull_request". You can test this by using the optional-refs branch of this repo:

      - name: 'Dependency Review'
        uses: actions/dependency-review-action@optional-refs
        with:
          base-ref: ...
          head-ref: ...

More info about defaults, and how to pass refs to other types of events in: https://github.com/actions/dependency-review-action/tree/optional-refs#configuration.

If no issues are found I'll cut a new release before the end of the week.

from dependency-review-action.

PatMyron avatar PatMyron commented on September 26, 2024

We have hundreds of repos using one reusable workflow with actions added centrally, and it's triggered by more event types like push, schedule, workflow_dispatch, etc

from dependency-review-action.

PatMyron avatar PatMyron commented on September 26, 2024

workaround: if: github.event_name == 'pull_request' from fastify/fastify#3884 (comment)

from dependency-review-action.

febuiles avatar febuiles commented on September 26, 2024

@PatMyron @Aaronkala Thanks for the report! Do these other event types support these fields?

owner: github.context.repo.owner,
repo: github.context.repo.repo,
baseRef: pull_request.base.sha,
headRef: pull_request.head.sha

If that's the case I think we can update the code to include them. I'm planning to start with workflow_dispatch, what else would benefit from this?

from dependency-review-action.

Serpentiel avatar Serpentiel commented on September 26, 2024

hey 👋, just ran into this issue too, and push event support is exactly what I'm looking for :)

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.