File a GitHub issue from a failed test run

Read test output, extract failures, and create GitHub issues automatically

File a GitHub issue from a failed test run

Overview

When a test fails, the context you need for a bug report is already in your terminal—but turning that into a filed issue breaks your flow. This template extracts the relevant details and creates the issue for you, skipping duplicates so you dont end up with repeat tickets.

How it works

  • Reads the most recent test output from your repository
  • Identifies failing tests and extracts the test name, error message, and file path
  • Checks if an open GitHub issue with a matching title already exists
  • Creates a new issue for each unique failure with the bug label
  • Assigns the issue to you automatically

Who this is for

Developers who want failed tests turned into tracked issues without manually copying error output into GitHub.

Suggested prompt

Read the most recent test output in this repository. Identify any failing tests and extract the test name, error message, and file path for each. For each failure, check if an open GitHub issue already exists with a matching title in [1. Repo name]. If no duplicate exists, create a new issue titled "[Bug] [test name]" with the error message and file path in the body, labeled "bug," and assigned to me.

Frequently asked questions

Can I assign issues to someone else?

Yes, replace assigned to me with a specific username or team in the prompt.

Can I use different labels?

Yes, modify the prompt to apply any labels that fit your projects conventions.

What if I use GitLab instead of GitHub?

Swap GitHub for GitLab in the prompt and connect GitLab to your MCP server.

Can I include the full stack trace?

Yes, modify the prompt to include additional context like the stack trace in the issue body.

File a GitHub issue from a failed test run