Back to blog

How to see failing CI builds and their GitHub issues in one place

Maksim Norkin (opens in a new tab)Product

· 7 min read

GitHub keeps failing runs and issues on separate pages. Here’s how to put each failing build beside the issue it belongs to: the links, the commands, and a sheet.

GitHub has no single page that lists your failing builds beside the issues they relate to. Failing runs sit in each repository’s Actions tab, issues in its Issues tab, and the only thing joining them is a chain: a run ran on a branch, the branch has a pull request, and the pull request names an issue. Where any link is missing, so is the connection. This guide follows that chain by hand: where each list is, what links a run to an issue, two commands that print them side by side, and a sheet for when you need it all in one place. GitHub Actions is the example; the sheet works for any CI service.

Where the failing builds are

In the browser, a repository’s Actions tab lists its workflow runs, and the sidebar narrows them to one workflow. Open a failed run and its summary shows which job failed; its logs can be searched and downloaded. From a terminal, the GitHub CLI does the same, one repository at a time: gh run list --status failure lists the latest failed runs, --branch and --workflow narrow them, and --limit fetches more than the default. gh run view <run-id> --log-failed prints only the steps that failed, which is usually the error you want.

Where the issues are

Issues are per repository too: the Issues tab, or gh issue list in a terminal. A run doesn’t know about issues and an issue doesn’t know about runs, so printing the two lists one after the other, which is what most answers to this question suggest, leaves the matching to you. The matching is the part that takes time, and it depends on the links below.

A run records its branch and commit. From there it reaches an issue through a pull request, or through the branch itself, in one of three ways:

  • A closing keyword. Writing Fixes #17 in the pull request’s description links issue 17 and closes it on merge. GitHub accepts close, closes, closed, fix, fixes, fixed, resolve, resolves and resolved, but only when the pull request goes into the default branch. Into any other branch the keyword is ignored and no link is made. A keyword in a commit message works too, but that pull request isn’t listed as linked.
  • The Development sidebar. Anyone with write access can link up to ten issues to a pull request by hand. From the pull request, the issue has to be in the same repository; from the issue’s own sidebar, the pull request or branch can be in another one.
  • A linked branch. gh issue develop 17 --checkout creates a branch linked to issue 17, so a run on that branch already points at its issue before a pull request exists.

Two kinds of failure fall outside all three. A pull request that names no issue, from a branch that isn’t linked either, leads nowhere. And a run on the default branch after a merge has no open pull request: to find the merged one its commit came from, search for the commit with gh pr list --search <sha> --state merged.

Side by side in a terminal

For failures on open pull requests, GitHub’s search does most of the join. The status:failure qualifier finds pull requests whose commits have a failed status, and the CLI can print each one with its branch and the issues it closes:

Example
# Open pull requests with a failed status, each with the issues it closes
gh pr list --search "status:failure" \
  --json number,headRefName,closingIssuesReferences \
  --jq '.[] | "#\(.number)  \(.headRefName)  fixes: \([.closingIssuesReferences[] | "\(.repository.owner.login)/\(.repository.name)#\(.number)"] | join(", "))"'

# Failed runs on the default branch (put its name in), with the commit each one ran on
gh run list --status failure --branch <default-branch> --limit 50 \
  --json databaseId,workflowName,headSha,url

# The steps that failed in one run
gh run view <run-id> --log-failed

The first command prints lines like #42 fix-login fixes: acme/app#17. An empty “fixes” means no closing keyword and no link made in the sidebar, so merging it closes nothing. A branch made with gh issue develop isn’t listed there, so check the issue’s Development sidebar before adding a keyword to the description. Run it in each repository you care about. To see failing pull requests across an organization, gh search prs --checks failure --state open --owner <org> lists them with their repository, but search results don’t carry the linked issues, so you open each one to see them.

A sheet, when you need it in one place

When the failures span several repositories, or someone who doesn’t use a terminal needs to see them, a spreadsheet is the honest DIY answer:

  1. One row per failing run, copied from the Actions tab or from the commands above.
  2. Add the pull request and the issue from the run’s branch and the pull request’s Development sidebar. Where there’s none, write None, so a gap reads as a gap.
  3. Paste the first failed step’s error, a line from --log-failed, not the whole log.
  4. Keep the run’s address, so anyone can open the run and check it.
  5. Note when you copied it. A rerun can pass a minute later, and the sheet won’t know.

Then, for each row with an issue, open the issue and comment with the error and the run’s address, so whoever picks it up starts from the failure rather than from the sheet.

What each route misses

RouteWhat it showsWhat it misses
The Actions tabFailing runs and their logs, per repositoryIssues, and other repositories
A pull request’s pageIts checks and its linked issuesRuns on the default branch, and every other pull request
The two CLI commandsFailing pull requests with the issues they closeIssues nobody linked; one repository at a time
A GitHub ProjectIssues and pull requests on one boardThe runs: a project holds issues and pull requests, not workflow runs
An action that opens an issue on failureA new failure as a comment on one “build failed” issueThe issue the work already belongs to
A sheetEverything, across repositoriesAnything that changed since you copied it
Ways to see failing builds next to their GitHub issues

The marketplace action in that table, Failed Build Issue, finds the latest open issue labelled build failed and comments on it, or opens a new one, and needs the workflow to have permission to write issues. It tells you something broke; it doesn’t connect the failure to the issue someone is already working on.

What we're building

Tabless is a browser extension that builds what you ask for from the sites you allow; nothing is typed or submitted without your OK. It isn't open yet. This job is the one we use to explain it: one developer's failing builds, their issues, and a button that posts the error.

It's designed to read the pages you already have open, such as a list of failing runs and the issues they belong to, through the session your browser already has, asking before it reads each site, and to build one view with a row per failing build, its issue beside it, and a Source column. A button on each row would open the issue and post that build's error as a comment when you click it, or in a batch whose rows and text you reviewed and confirmed, one row at a time, with daily limits per site. Refresh reads the same pages again. What it reads to build a view goes to Tabless's server and an AI provider, and each site's own terms still apply.

FAQ

Does GitHub show failing builds and their issues on one page?

Not for a whole repository. A pull request’s page shows its own checks and the issues linked to it, and that’s the closest GitHub gets. Failing runs are listed in the Actions tab and issues in the Issues tab, one repository at a time.

Why isn’t my pull request linked to the issue it fixes?

A closing keyword such as “Fixes #17” links only when the pull request goes into the default branch, and in a commit message it doesn’t list the pull request as linked. Link it by hand from the Development sidebar instead.

Can Tabless put my failing builds next to their issues?

Not yet. Tabless isn't open, and this is one of the jobs we're building it for. Join the waitlist, and we'll let you know when you can try Tabless.