Skip to content

Commit

Permalink
fix diff-dep: only look at requirements.in + get correct base for diff
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-codecov committed Sep 5, 2024
1 parent 2606974 commit 1f94bec
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/diff-dep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,25 @@ on:
dep:
type: string
required: true
reqs_file:
type: string
default: 'requirements.in'
jobs:
post-comment:
name: Post comment
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-depth: 2

# Generate a GitHub link to a page that displays all commits/changes between
# the old dependency version and the new one, or an empty string if the dependency
# wasn't changed.
- name: Get compare URL
id: get-compare-url
run: |
compare_url=$(git diff -r ${{ github.event.pull_request.base.sha }} \
compare_url=$(git diff -r HEAD^ ${{ inputs.reqs_file }} \
| grep ${{ inputs.dep }}\/archive \
| cut -d '/' -f 7 \
| cut -d '.' -f 1 \
Expand Down

0 comments on commit 1f94bec

Please sign in to comment.