# GitHub issue to pull request Import an open public GitHub issue for a connected fork, investigate the bug, and prepare an upstream pull request. ## Can Prilog investigate a GitHub bug report and open a PR? Prilog can import an open public GitHub issue for a connected fork, investigate it against the source, prepare a fix, and create a pull request targeting the upstream repository. This documented import flow is for public issues; it is not a generic importer for every private backlog. You can start with an existing issue instead of installing monitoring. For production telemetry, use [automatic bug fixing](/docs/automatic-bug-fixing/). ## Connect the fork first 1. Fork the upstream repository and check out the intended branch locally. 2. Create one Prilog project for that upstream repository, or select its existing project. 3. Run `prilog add-repo` in the fork and complete browser setup. 4. Install the Prilog GitHub App on the fork and select the upstream default branch during service setup. ```bash prilog login prilog create-project "Upstream bug fixes" prilog add-repo prilog status ``` ## Import and investigate Replace the example issue with an actual open public bug report: ```bash prilog issue import owner/upstream#123 prilog list prilog fix ERROR_ID ``` Use the error ID returned by the import. Analysis runs asynchronously and may already be triggered by configured automation. Check state before requesting additional work. The importer rejects closed issues, PR URLs, unrelated forks, and an incorrect upstream base branch. Clear reproduction steps, expected behavior, and an affected revision make an issue easier to investigate. ## Review the patch and create the PR ```bash prilog diff ERROR_ID prilog pr ERROR_ID ``` Run the PR command after reviewing the generated change. It uses a generated branch in the connected fork and targets the upstream issue's repository. Review the returned PR URL, CI results, and maintainer feedback. A generated patch does not imply acceptance or a successful merge. ## Use an assistant or script The [CLI](/docs/cli/#json-output-and-automation) supports JSON results with explicit project selection. A hosted assistant can use [MCP `import_github_issue`](/docs/mcp/#write-tools), followed by analysis, diff inspection, and requested PR creation. The [Prilog skill](/docs/plugins/) guides supported agents through those steps; directory listings remain subject to approval. ## Inspect public results The [merged-fix examples](/docs/merged-fixes/) link directly to upstream PRs. The [SWE-bench evaluation](/docs/swe-bench-verified/) describes a separate benchmark with a feedback-guided prediction set. Neither establishes the success rate for your own backlog.