Status: ✅ Done (2026-02-18); --issue added 2026-02-23; --diff + Diff Coverage Summary added 2026-02-25; ignore/unignore options added 2026-03-02; analysis status + --reanalyze added 2026-03-05
Show details for a specific pull request — about info, analysis status with gate results, issues list, and changed files.
codacy pull-request <provider> <organization> <repository> <prNumber>
codacy pr gh my-org my-repo 42
codacy pr gh my-org my-repo 42 --issue 12345
codacy pr gh my-org my-repo 42 --output json
codacy pr gh my-org my-repo 42 --reanalyze
| Option | Short | Description |
|---|---|---|
--issue <issueId> |
-i |
Show full detail for a single issue (by resultDataId) |
--diff |
-d |
Show git diff annotated with coverage hits/misses and issues |
--ignore-issue <issueId> |
-I |
Ignore a specific issue in this PR |
--ignore-all-false-positives |
-F |
Ignore all potential false positive issues |
--ignore-reason <reason> |
-R |
Reason: AcceptedUse (default) | FalsePositive | NotExploitable | TestCode | ExternalCode |
--ignore-comment <comment> |
-m |
Optional comment for ignore actions |
--unignore-issue <issueId> |
-U |
Unignore a specific issue in this PR |
--reanalyze |
-A |
Request reanalysis of the HEAD commit |
getRepositoryPullRequest— PR metadata + analysis summarylistPullRequestIssues(status=new, onlyPotential=false) — new confirmed issueslistPullRequestIssues(status=new, onlyPotential=true) — new potential issueslistPullRequestFiles— files with metric deltasgetRepositoryPullRequestFilesCoverage— files coveragegetPullRequestCommitswithlimit=1— head commit timing for analysis statuslistCoverageReportswithlimit=1—hasCoverageOverviewflag
When --issue <issueId> is provided:
- Fetch all PR issues (confirmed + potential) using
fetchAllPrIssues()pagination helper - Find the issue by
resultDataId - Fetch
getPattern+getFileContentin parallel - Render using shared
printIssueDetailfromutils/formatting.ts
When --diff is provided, print the git diff annotated with coverage hits/misses and issues.
Fetches in parallel:
getPullRequestDiff— PR's git diffgetRepositoryPullRequestFilesCoverage— diff coverage by filelistPullRequestIssues(confirmed + potential)
Only prints blocks containing lines with coverage hits/misses or issues. Uses parseDiff from utils/diff.ts.
Example output:
-------------------------------------------------------------------------------
path/to/file.ts
@@ -29,54 +29,17 @@
...
✓ 49 + return { x }; // covered
✘ 50 + return { y }; // not covered
┃ 51 + return { z };
┃ ↳ Critical | Security Cryptography #123456
┃ Object property should be a constant.
...
-------------------------------------------------------------------------------
Styling: unchanged=gray, removed=dark gray, added=white; covered line number/pipe=green; uncovered=red; issue pipe=severity color. When a line has both coverage and an issue, coverage symbol takes priority.
| Field | Source |
|---|---|
| Repository | provider / org / repo |
| Pull Request | #number — title |
| Status | pullRequest.status |
| Author | pullRequest.owner.name |
| Branches | originBranch → targetBranch |
| Updated | pullRequest.updated (friendly date) |
| Analysis | formatAnalysisStatus() — see analysis.md |
- Analyzing: Yes/No
- Up to Standards: green ✓ / red ✗ (from
quality.isUpToStandards+coverage.isUpToStandards) - Issues:
+new / -fixedwith gate coloring; inline reason if failing or pending - Coverage, Complexity, Duplication: deltas with gate coloring + inline reasons
Gate reasons come from quality.resultReasons and coverage.resultReasons.
Merged list of confirmed + potential issues, sorted by severity (Error > High > Warning > Info).
If coverage data is available, a per-file summary showing coverage % and uncovered line ranges:
src/index.ts | 85.0% | Uncovered lines: 23,32,78-90
Only files with any metric delta change. Columns: file path, issues (+new/-fixed), coverage delta, complexity delta, duplication delta.
File: src/commands/pull-request.test.ts — 27 tests.