Skip to content

Commit

Permalink
Fetch the target branch in its own step and clean up some of the extr…
Browse files Browse the repository at this point in the history
…a debugging logging stuff.
  • Loading branch information
SpicyLemon committed Jul 29, 2024
1 parent 2964720 commit 4e3e92f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ jobs:
token: ${{ secrets.BOT_CPR_PAT }}
fetch-depth: 2

- name: Fetch Target Branch
run: git fetch origin "${PR_TARGET}:${PR_TARGET}" --depth 1

- name: Generate entry
env:
# Getting the title directly in the run script opens an injection vulnerability.
Expand All @@ -34,10 +37,6 @@ jobs:
PR_BASE: ${{ github.event.pull_request.head.ref }}
PR_TARGET: ${{ github.event.pull_request.base.ref }}
run: |
printf 'git status\n' && git status
printf 'git fetch origin "%s:%s" --depth 1\n' "$PR_TARGET" "$PR_TARGET" && git fetch origin "${PR_TARGET}:${PR_TARGET}" --depth 1
printf 'git status\n' && git status
printf 'git branch\n' && git branch
./scripts/dependabot-changelog.sh \
--verbose \
--pr "$PR_NUM" \
Expand Down

0 comments on commit 4e3e92f

Please sign in to comment.