Giter Site home page Giter Site logo

Comments (5)

febuiles avatar febuiles commented on June 25, 2024 1

@reedloden Can those be interpolated in the config to achieve the same result? I haven't tried yet, but I'm thinking of something like:

name: 'Dependency Review'
on: push

permissions:
  contents: read

jobs:
  dependency-review:
    runs-on: ubuntu-latest
    steps:
      - name: 'Checkout Repository'
        uses: actions/checkout@v3
      - name: 'Dependency Review'
        uses: actions/dependency-review-action@v2
        with:
          # insert the event fields here
          base-ref: ${{ github.event.before }}
          head-ref: ${{ github.sha }}

from dependency-review-action.

febuiles avatar febuiles commented on June 25, 2024

@reedloden The reason for using the PR events is that we get the refs automatically from the PR itself. How can we fetch those values by default for other types of events?

from dependency-review-action.

reedloden avatar reedloden commented on June 25, 2024

@febuiles Wouldn't it be possible (for the majority of cases, at least) for you to compare github.sha with github.event.before? If github.event.before is 0000000000000000000000000000000000000000, then just treat it as initial commit and scan the full contents of the commit (versus the diff). Hopefully, I got those variables correct. The docs are not that great.

from dependency-review-action.

AndyKIron avatar AndyKIron commented on June 25, 2024

@reedloden Can those be interpolated in the config to achieve the same result? I haven't tried yet, but I'm thinking of something like:

name: 'Dependency Review'
on: push

permissions:
  contents: read

jobs:
  dependency-review:
    runs-on: ubuntu-latest
    steps:
      - name: 'Checkout Repository'
        uses: actions/checkout@v3
      - name: 'Dependency Review'
        uses: actions/dependency-review-action@v2
        with:
          # insert the event fields here
          base-ref: ${{ github.event.before }}
          head-ref: ${{ github.sha }}

It works :)

from dependency-review-action.

febuiles avatar febuiles commented on June 25, 2024

Great to hear, marking as closed!

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.