Skip to content

Commit 12d2462

Browse files
authored
workflows: add comment with action link in PR (#1080)
When running tests on pull request it's not easy to identify the proper workflow. This patch adds a link to the workflow to the PR comment. This way it will be easy to find the proper workflow should the tests fail.
2 parents 3ad7cfc + ed96236 commit 12d2462

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/test-pr.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ jobs:
7575
- name: Prepare PR comment
7676
id: pr_comment_prep
7777
run: |
78-
echo "## Test jobs for commit ${{ github.event.workflow_run.head_sha }}" > pr-comment.txt
78+
echo "## Test run [workflow](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})" > pr-comment.txt
79+
echo "## Test jobs for commit ${{ github.event.workflow_run.head_sha }}" >> pr-comment.txt
7980
for json_file in $(find ${{ github.workspace }} -name "test-job-*.json")
8081
do
8182
DEVICE_TYPE=$(cat "$json_file" | jq -r ".requested_device_type")

0 commit comments

Comments
 (0)