details_url not working
alex-page opened this issue Β· 8 comments
Hey @LouisBrunner π
I expect that details_url
would change the link that the user navigates to when pressing details
. This currently doesn't work as intended. Doing some research I noticed this post which might be a similar problem.
https://github.community/t/checks-api-creating-new-check-run-can-not-set-details-url/152651
Using the Create a check run 3 API I can not seem to set the details_url. Note that the creation of the new Check Run is running in the context of a GitHub Workflow. All of the other parameters are settable."
Hi @alex-page,
Yeah, the whole action_required
flow doesn't work either from what I can see (which is a huge bummer, you could do such cool stuff with it!)
As explained in your link, it looks like a problem with Github's API and not something I can address in this repo, but it's good to keep in mind nonetheless?
Thanks for this great action.
I just hit this issue. It seems like it is impossible to provide a working details_url
, due to the github API problem described above.
Shouldn't the details_url
option be removed from the action then? Or at least a warning in the documentation that this feature doesn't actually work? Otherwise people will keep trying and then ending up here...
Been following this issue for a while. I brought this up on the GitHub community forum and got an answer as to why this may not be working.
From GitHub staff "We donβt support showing a details_url for check runs created with the Actions GITHUB_TOKEN."
Thanks for the reply!
From GitHub staff "We donβt support showing a details_url for check runs created with the Actions GITHUB_TOKEN."
This is good advice. I'm going to see if it works with a different access token.
Shouldn't the
details_url
option be removed from the action then? Or at least a warning in the documentation that this feature doesn't actually work? Otherwise people will keep trying and then ending up here...
That's a fair point, I guess I was hoping it would get fixed one day and starting working silently π
From GitHub staff "We donβt support showing a details_url for check runs created with the Actions GITHUB_TOKEN."
If we had a way to detect what kind of token is provided we could throw an error explicitly which might be helpful?
Anyone figured out the flow yet how one would need to set up an app to get such a working token?
Anyone figured out the flow yet how one would need to set up an app to get such a working token?
I just had to do the same, so I'll share some details. Sorry if the walkthrough isn't detailed enough π
- create a fake app and install it on your repo (https://github.com/organizations/yourorg/settings/apps/)
- give it Checks rights
- setup the private key - you'll see that when creating the app, you'll download the private key when setting it up
- install your app on your repo(s)
This being done, you now need to get to the generate a token for use in your github actions. Those have a time limit, so they need to be generated on the fly in your workflows
I went with https://github.com/marketplace/actions/get-an-app-token-in-an-actions-workflow, but there seem to be alternatives
Generally from now on you can follow instructions there: https://github.com/marketplace/actions/get-an-app-token-in-an-actions-workflow#usage
Have fun hacking away what you shouldn't have to π
Hi Everyone (@muryoh @alex-page ), looks like I joined you all in heading down this rabbit hole to get a custom details_url link working in my Github Actions workflow, specifically the Details link on a Pull Request screen. Seems like the Check Run API was the wrong thing to try. I eventually found this other Github Action to create a Commit Status. This looks to be using the "Create a Commit Status" API: https://docs.github.com/en/rest/commits/statuses#create-a-commit-status
The good thing about that other action is that it can run with a regular {{ secrets.GITHUB_TOKEN }}
value. The value to supply is the target_url
, and that will indeed be the URL behind the "Details" link on the PR screen.