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

details_url not working #18

Open
alex-page opened this issue Feb 24, 2021 · 8 comments
Open

details_url not working #18

alex-page opened this issue Feb 24, 2021 · 8 comments
Labels
bug Something isn't working dependencies Pull requests that update a dependency file help wanted Extra attention is needed

Comments

@alex-page
Copy link

alex-page commented Feb 24, 2021

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.saobby.my.eu.orgmunity/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."

Screen Shot 2021-02-23 at 7 27 19 PM

@LouisBrunner
Copy link
Owner

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?

@rabernat
Copy link

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...

@bkwhite
Copy link

bkwhite commented Nov 16, 2021

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."

Thread / Answer here.

@rabernat
Copy link

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.

@LouisBrunner
Copy link
Owner

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?

@LouisBrunner LouisBrunner reopened this Nov 16, 2021
@janpio
Copy link

janpio commented Jan 30, 2022

Anyone figured out the flow yet how one would need to set up an app to get such a working token?

@muryoh
Copy link

muryoh commented Feb 1, 2022

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 🙏

  1. create a fake app and install it on your repo (https://github.com/organizations/yourorg/settings/apps/)
  2. give it Checks rights
  3. setup the private key - you'll see that when creating the app, you'll download the private key when setting it up
  4. 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 😄

@LouisBrunner LouisBrunner pinned this issue Aug 31, 2022
@LouisBrunner LouisBrunner added the help wanted Extra attention is needed label Aug 31, 2022
@joshuamoore-point
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies Pull requests that update a dependency file help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

7 participants