diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index f6e674f8c..64daeca59 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -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. @@ -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" \