Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/coverage-pr-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ jobs:
- name: Set PR base on codecov
run: |
# fetch the merge commit between the PR base and head
BASE_REF=refs/heads/${{ github.event.pull_request.base.ref }}
MERGE_REF=refs/pull/${{ github.event.pull_request.number }}/merge

git fetch -u --progress --depth=1 origin "+$BASE_REF:$BASE_REF" "+$MERGE_REF:$MERGE_REF"
while [ -z "$(git merge-base "$BASE_REF" "$MERGE_REF")" ]; do
git fetch -u -q --deepen="10" origin "$BASE_REF" "$MERGE_REF";
Expand All @@ -38,3 +35,8 @@ jobs:
--slug PyO3/pyo3 \
--token ${{ secrets.CODECOV_TOKEN }} \
--service github
env:
# Don't put these in bash, because we don't want the expansion to
# risk code execution
BASE_REF: "refs/heads/{{ github.event.pull_request.base.ref }}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
BASE_REF: "refs/heads/{{ github.event.pull_request.base.ref }}"
BASE_REF: "refs/heads/${{ github.event.pull_request.base.ref }}"

I think this one is missing a "$" for expansion? At least it is currently broken in #4768

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sigh, yes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops! 🙈

MERGE_REF: "refs/pull/${{ github.event.pull_request.number }}/merge"
Loading