How to get Checks API 'Details' link in PR to point to external URL

How can I get the ‘Details’ link for a check that shows on a PR to link directly to a specific URL? The Jenkins Github API plugin has this built into their checks where the ‘Details’ link takes you straight to the Jenkins build. I noticed there is a details_url attribute on the CheckRun object. But, setting that didn’t do anything. Is there something I’m missing? I can’t find any documentation about this. But, I know it’s possible because our Jenkins plugin has it working this way.

2 Likes

Any word on this? Is this because the Jenkins plugin is using an old API?

I think you can use Statuses: https://docs.github.com/en/free-pro-team@latest/rest/reference/repos#statuses

We return those to GitHub API instead of check statuses, and filling target_url parameter leads to ‘Details’ with external link.