Skip to content

Commit 746d36c

Browse files
committed
Merge bitcoin/bitcoin#33754: ci: gha: Set debug_pull_request_number_str annotation
fa9d0f9 ci: gha: Set debug_pull_request_number_str annotation (MarcoFalke) Pull request description: GitHub Actions does not offer any way to determine the pull request number in a machine readable way from the checks API. See bitcoin/bitcoin#27178 (comment). However, the pull request number can be useful for external tools to act on CI results. Fix that by using a check run annotation for a single task named `debug_pull_request_number_str`. This should re-enable the 'CI Failed' labelling mechanism via maflcko/DrahtBot@1f24cc1. ACKs for top commit: l0rinc: code review ACK fa9d0f9 willcl-ark: ACK fa9d0f9 Tree-SHA512: d872b81afeaef603006bb65f18acafdff2771acf2b70af4ab6b46167b0826e96b1ac434bba2020833107922eaf1e73f59a50782a535ba04ea16921f1828d42ca
2 parents 25c45bb + fa9d0f9 commit 746d36c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ jobs:
3535
outputs:
3636
provider: ${{ steps.runners.outputs.provider }}
3737
steps:
38+
- name: Annotate with pull request number
39+
# This annotation is machine-readable and can be used to assign a check
40+
# run to its corresponding pull request. Running in one check run is
41+
# sufficient for each check suite.
42+
run: |
43+
if [ "${{ github.event_name }}" = "pull_request" ]; then
44+
echo "::notice title=debug_pull_request_number_str::${{ github.event.number }}"
45+
fi
3846
- id: runners
3947
run: |
4048
if [[ "${REPO_USE_CIRRUS_RUNNERS}" == "${{ github.repository }}" ]]; then

0 commit comments

Comments
 (0)