Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Current Actions URL is not useful when an action runs many times on the same commit, it shows many runs and it's impossible to say which one triggered the notification. #116

Closed
Jolg42 opened this issue Jan 4, 2022 · 5 comments

Comments

@Jolg42
Copy link

Jolg42 commented Jan 4, 2022

The current Actions URL point to (https://github.com/org/repo/commit/sha/checks)

For example https://github.com/prisma/language-tools/commit/1e465e035ebd81650ec70146fd14cd4a943b29a2/checks
This example has a quite a few actions runs on the same commit which makes it really hard to know which run triggered the notification
Screen Shot 2022-01-04 at 17 22 09

My current workaround is to change the footer with the link to the actual run like this

      - name: Set current job url in SLACK_FOOTER env var
        if: always()
        run: echo "SLACK_FOOTER=<$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID|Click here to go to the job logs>" >> $GITHUB_ENV

Which looks like this
Screen Shot 2022-01-04 at 17 26 21

It works very well but it would be amazing (and less YAML 😅) to have something like this directly implemented in this action.

I could see different options

  • Change the default Action URL
  • Same but only opt-in with a param?
  • Recommend this workaround (not the best)

What are your thoughts?

@shino
Copy link

shino commented Feb 4, 2022

Same issue on me!

I read github actions doc a bit, and found GITHUB_RUN_ID
https://docs.github.com/en/actions/learn-github-actions/environment-variables

A unique number for each workflow run within a repository. This number does not change if you re-run the workflow run. For example, 1658821493.

It can help if one can construct the URL to current workflow run with this ID as
https://github.com/<user>/<repo>/runs/<GITHUB_RUN_ID>?check_suite_focus=true , right?

@shino
Copy link

shino commented Feb 4, 2022

@shino
Copy link

shino commented Feb 4, 2022

Oops, the url construction is already explained in the description 😓

@L0RD-ZER0
Copy link
Collaborator

This one has been resolved in #162, and would be available for use as soon as the new build is published. Credits to @shino for giving a workaround.

@Jolg42
Copy link
Author

Jolg42 commented Mar 11, 2024

Thanks 🙌🏼 ! I'm curious to check this once it's released!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants