From 1f94becb9f9a0cd87c4b3b5b837d14abc9f7b381 Mon Sep 17 00:00:00 2001 From: Matt Hammerly Date: Thu, 5 Sep 2024 10:15:17 -0700 Subject: [PATCH] fix diff-dep: only look at requirements.in + get correct base for diff --- .github/workflows/diff-dep.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/diff-dep.yml b/.github/workflows/diff-dep.yml index 1891755..2d83903 100644 --- a/.github/workflows/diff-dep.yml +++ b/.github/workflows/diff-dep.yml @@ -6,6 +6,9 @@ on: dep: type: string required: true + reqs_file: + type: string + default: 'requirements.in' jobs: post-comment: name: Post comment @@ -13,7 +16,7 @@ jobs: 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 @@ -21,7 +24,7 @@ jobs: - 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 \