From aeae1dd74a4c621e2176d730469e13591b108920 Mon Sep 17 00:00:00 2001 From: Ivan Lee Date: Sat, 8 Jan 2022 06:33:17 -0500 Subject: [PATCH] Add link to Github Action run as part of notification. (#181) --- README.md | 4 ++-- app/script.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f8c1b59..e5688c7 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ ONLY_NOTIFY_ON_ISSUES | True/False | If present, will only send notifications if Sample Workflow section: ```.env - name: notify-tests - uses: ./ + uses: ivanklee86/xunit-slack-reporter@v1.3.0 env: EXIT_CODE_FROM_REPORT: "True" SLACK_CHANNEL: CKQ7C7KJN @@ -44,7 +44,7 @@ Sample Workflow section: ```.env - name: notify-tests - uses: ./ + uses: ivanklee86/xunit-slack-reporter@v1.3.0 env: ONLY_NOTIFY_ON_ISSUES: "True" SLACK_CHANNEL: CKQ7C7KJN diff --git a/app/script.py b/app/script.py index cb2a541..6e7f098 100644 --- a/app/script.py +++ b/app/script.py @@ -42,7 +42,7 @@ def main(): slack_attachment = { "color": constants.PASS_COLOR, "author_name": "XUnit Slack Reporter", - "author_link": "https://github.com/ivanklee86/xunit-slack-reporter", + "author_link": f"https://github.com/{os.getenv('GITHUB_REPOSITORY')}/actions/runs/{os.getenv('GITHUB_RUN_ID')}", "title": f"XUnit test results for {os.getenv('GITHUB_WORKFLOW')} on {os.getenv('GITHUB_REF')}", "fields": [] }