CheckRun must have detailsUrl

A GitHub CheckRun has a detailsUrl - https://docs.github.com/en/graphql/reference/objects#checkrun This can be null which is good for me, as for my app there is no external report. It is all self contained in the GitHub check run output. As such I do not set any detailsUrl when I update / create the check run.

However, it still displays a View more details on MyApp link, which defaults to my app’s homepage. This is confusing for the user, as they expect to see more details on the result, but do not.

Can there be a way to not display this link for cases like mine where there are no additional details to view on an external site?

1 Like

:wave: @alistairb: Thanks for sharing this observation with us! I’d love to see what you’re seeing: could you share an example of that View more details on MyApp copy in the form of a pull request in a public repository? Previous to reading this report, I’d expect that link to actually point to the respective check run URL within GitHub.com, though I’m interested in determining what might have changed on our end that would cause that to happen.

With that example on hand, I’ll review it and we’ll take the next steps! :+1:

@francisfuzz sorry for the delay. For example if you look at this check run report https://github.com/deadpendency/deadpendency-example/pull/1/checks at the bottom you can see View more details on Deadpendency at the bottom. This simply links to the Homepage URL specified in my app’s settings.

I would instead expect not setting the detailsUrl to not render this link at all. A user will be disappointed if they click this and no more details!

@alistairb - My apologies for the delay––I looked into this for you, and I have an update!

As you’ve noted in the OP, a check run’s details_url value can be null upon its creation. details_url could be updated later by making the appropriate call––via the Update a check run REST API endpoint or the updateCheckRun mutation––but it can also just be left alone (as you’ve done).

The current implementation of the View more details on {Application Name} will link to one of two values:

  • the details_url value that was specified upon the check run’s creation (or whenever it was last updated)
  • the GitHub App’s URL as it was set during its creation (or whenever it was last updated)

For the case you’ve shared, no details_url was specified in either the call creating the check run nor in any calls updating it (if they were ever made). However, we automatically set the value of a check run’s details_url to the GitHub App’s URL.

As far as I know, there isn’t a way to disable that default behavior of automatically setting the details_url. Prior to this explanation and putting myself in your shoes––I could see how that can be confusing and it’s something that our product team would love to more hear about so they can consider that feedback for future iterations.

That said, because it’s possible to update a check run after its created, you could leverage that
by setting the value of details_url to the html_url value defined on the check run. This avoids the confusion of being pointed to your application’s marketing website and effectively serves as a no-op function. Here’s an example curl request for fetching that particular check run:

curl -v -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/repos/deadpendency/deadpendency-example/check-runs/1109598375
Check run output
{
  "id": 1109598375,
  "node_id": "MDg6Q2hlY2tSdW4xMTA5NTk4Mzc1",
  "head_sha": "1ebed60a97dd42ec61c29e357271194fb35473f3",
  "external_id": "",
  "url": "https://api.github.com/repos/deadpendency/deadpendency-example/check-runs/1109598375",
  "html_url": "https://github.com/deadpendency/deadpendency-example/runs/1109598375",
  "details_url": "https://deadpendency.com",
  "status": "completed",
  "conclusion": "failure",
  "started_at": "2020-09-13T23:51:35Z",
  "completed_at": "2020-09-13T23:51:44Z",
  "output": {
    "title": "Deadpendency Check Result",
    "summary": "Unhealthy dependencies detected! 🧟",
    "text": "<h2>Dependency Reports</h2><h3>Unhealthy 🧟</h3><ul><li id=\"dependency-report-failure\"><strong>jquery-ui</strong> &ndash; <a href=\"https://github.com/jquery/jquery-ui\" id=\"source-repo-link\" title=\"source repository\">📄</a> <a href=\"https://www.npmjs.com/package/jquery-ui\" id=\"package-repo-link\" title=\"registry package\">📦</a><ul><li id=\"failure\">❌ Last package release over 12 months ago. Last release: 2016-09-14</li></ul></li><li id=\"dependency-report-failure\"><strong>nomnom</strong> &ndash; <a href=\"https://github.com/harthur/nomnom\" id=\"source-repo-link\" title=\"source repository\">📄</a> <a href=\"https://www.npmjs.com/package/nomnom\" id=\"package-repo-link\" title=\"registry package\">📦</a><ul><li id=\"failure\">❌ No commits within the last 9 months.</li><li id=\"failure\">❌ Package has been deprecated in the package registry. More Info: Package no longer supported. Contact support@npmjs.com for more info.</li><li id=\"failure\">❌ Last package release over 12 months ago. Last release: 2014-11-07</li></ul></li><li id=\"dependency-report-failure\"><strong>(github.com:deadpendency/an-archived-repo)</strong> &ndash; <a href=\"https://github.com/deadpendency/an-archived-repo\" id=\"source-repo-link\" title=\"source repository\">📄</a><ul><li id=\"failure\">❌ Only 1 commit(s) within last year. Expected more than 4.</li><li id=\"failure\">❌ Repository is archived.</li></ul></li></ul><h3>Healthy With Warnings 🤒</h3><ul><li id=\"dependency-report-warning\"><strong>(github.com:deadpendency/jquery-fork)</strong> &ndash; <a href=\"https://github.com/deadpendency/jquery-fork\" id=\"source-repo-link\" title=\"source repository\">📄</a><ul><li id=\"warning\">⚠ The repository is a fork.</li></ul></li></ul><h3>Healthy 😊</h3><ul><li id=\"dependency-report-pass\">@testing-library/jest-dom &ndash; <a href=\"https://github.com/testing-library/jest-dom\" id=\"source-repo-link\" title=\"source repository\">📄</a> <a href=\"https://www.npmjs.com/package/@testing-library/jest-dom\" id=\"package-repo-link\" title=\"registry package\">📦</a></li><li id=\"dependency-report-pass\">@testing-library/react &ndash; <a href=\"https://github.com/testing-library/react-testing-library\" id=\"source-repo-link\" title=\"source repository\">📄</a> <a href=\"https://www.npmjs.com/package/@testing-library/react\" id=\"package-repo-link\" title=\"registry package\">📦</a></li><li id=\"dependency-report-pass\">@testing-library/user-event &ndash; <a href=\"https://github.com/testing-library/user-event\" id=\"source-repo-link\" title=\"source repository\">📄</a> <a href=\"https://www.npmjs.com/package/@testing-library/user-event\" id=\"package-repo-link\" title=\"registry package\">📦</a></li><li id=\"dependency-report-pass\">lodash &ndash; <a href=\"https://github.com/lodash/lodash\" id=\"source-repo-link\" title=\"source repository\">📄</a> <a href=\"https://www.npmjs.com/package/lodash\" id=\"package-repo-link\" title=\"registry package\">📦</a></li><li id=\"dependency-report-pass\">react &ndash; <a href=\"https://github.com/facebook/react\" id=\"source-repo-link\" title=\"source repository\">📄</a> <a href=\"https://www.npmjs.com/package/react\" id=\"package-repo-link\" title=\"registry package\">📦</a></li><li id=\"dependency-report-pass\">react-scripts &ndash; <a href=\"https://github.com/facebook/create-react-app\" id=\"source-repo-link\" title=\"source repository\">📄</a> <a href=\"https://www.npmjs.com/package/react-scripts\" id=\"package-repo-link\" title=\"registry package\">📦</a></li><li id=\"dependency-report-pass\">underscore &ndash; <a href=\"https://github.com/jashkenas/underscore\" id=\"source-repo-link\" title=\"source repository\">📄</a> <a href=\"https://www.npmjs.com/package/underscore\" id=\"package-repo-link\" title=\"registry package\">📦</a></li></ul><h3>Ignored</h3><ul><li id=\"dependency-report-ignore\">react-dom</li></ul><p id=\"deadpendency-version\">Deadpendency Version: 0.1.1</p>",
    "annotations_count": 0,
    "annotations_url": "https://api.github.com/repos/deadpendency/deadpendency-example/check-runs/1109598375/annotations"
  },
  "name": "Deadpendency Check",
  "check_suite": {
    "id": 1174935720
  },
  "app": {
    "id": 51614,
    "slug": "deadpendency",
    "node_id": "MDM6QXBwNTE2MTQ=",
    "owner": {
      "login": "deadpendency",
      "id": 60385638,
      "node_id": "MDEyOk9yZ2FuaXphdGlvbjYwMzg1NjM4",
      "avatar_url": "https://avatars2.githubusercontent.com/u/60385638?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/deadpendency",
      "html_url": "https://github.com/deadpendency",
      "followers_url": "https://api.github.com/users/deadpendency/followers",
      "following_url": "https://api.github.com/users/deadpendency/following{/other_user}",
      "gists_url": "https://api.github.com/users/deadpendency/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/deadpendency/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/deadpendency/subscriptions",
      "organizations_url": "https://api.github.com/users/deadpendency/orgs",
      "repos_url": "https://api.github.com/users/deadpendency/repos",
      "events_url": "https://api.github.com/users/deadpendency/events{/privacy}",
      "received_events_url": "https://api.github.com/users/deadpendency/received_events",
      "type": "Organization",
      "site_admin": false
    },
    "name": "Deadpendency",
    "description": "Deadpendency assesses your repository dependencies from a project health standpoint. It produces a report identifying warnings and errors which suggest that a dependency may not be actively maintained or have other issues. For example, it may be deprecated in the package registry.\r\n\r\nThe deadpendency check runs for each push to a repository producing a check run report. Unhealthy dependencies fail the check. [See an example report](https://github.com/deadpendency/deadpendency-example/pull/1/checks).\r\n\r\nSee [deadpendency.com](https://deadpendency.com) for more information.",
    "external_url": "https://deadpendency.com",
    "html_url": "https://github.com/apps/deadpendency",
    "created_at": "2020-01-19T07:05:42Z",
    "updated_at": "2020-09-13T23:55:50Z",
    "permissions": {
      "checks": "write",
      "contents": "read",
      "metadata": "read"
    },
    "events": [
      "check_suite"
    ]
  },
  "pull_requests": [
    {
      "url": "https://api.github.com/repos/deadpendency/deadpendency-example/pulls/1",
      "id": 449277713,
      "number": 1,
      "head": {
        "ref": "add-dependency",
        "sha": "1ebed60a97dd42ec61c29e357271194fb35473f3",
        "repo": {
          "id": 279760159,
          "url": "https://api.github.com/repos/deadpendency/deadpendency-example",
          "name": "deadpendency-example"
        }
      },
      "base": {
        "ref": "master",
        "sha": "f3e2b5456963dcac90d9c9b7fcbbe2bf07bfbeeb",
        "repo": {
          "id": 279760159,
          "url": "https://api.github.com/repos/deadpendency/deadpendency-example",
          "name": "deadpendency-example"
        }
      }
    }
  ]
}

Walking through all of that, my personal opinion (as I know our development team might see it differently :wink:) is to provide a way for integrators to disable that particular view component programmatically or override the details_url with an indicator for doing so.

I hope this context helps!

1 Like

Thanks for the update. I will send feedback by the feedback form. Cheers.

1 Like