From 18b9e8fbcbb6345ceb2a040dfacf81fac53b83ff Mon Sep 17 00:00:00 2001 From: Stuart Leeks Date: Sat, 26 Feb 2022 15:38:59 +0000 Subject: [PATCH] Add link to workflow run (#1384) * Explicitly set SHA for checks status * Add link to workflow run in PR comment --- .github/workflows/pr_comment_bot.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/pr_comment_bot.yml b/.github/workflows/pr_comment_bot.yml index 63fc00b987..046db287f9 100644 --- a/.github/workflows/pr_comment_bot.yml +++ b/.github/workflows/pr_comment_bot.yml @@ -136,10 +136,23 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} # the name must be identical to the one received by the real job + sha: ${{ steps.get_pr_details.outputs.prRef }} name: "Deploy PR / Run E2E Tests (Smoke)" status: "completed" conclusion: "success" + - name: Comment with link to run + if: ${{ steps.check_command.outputs.result == 'run-tests' }} + env: + PR_NUMBER: ${{ github.event.issue.number }} + REPO: ${{ github.event.repository.full_name }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + RUN_ID: ${{ github.run_id }} + run: | + echo "Showing help on PR ${PR_NUMBER}" + gh pr comment ${PR_NUMBER} --repo $REPO --body "Running tests: https://github.com/${REPO}/actions/runs/${RUN_ID}" + + run_test: # Run the tests with the re-usable workflow needs: [pr_comment]