Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion SPECS/commands/issues.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,13 @@ Both accept the same `SearchRepositoryIssuesBody` for filtering.
| `--languages <languages>` | `-l` | Comma-separated language names |
| `--tags <tags>` | `-t` | Comma-separated tag names |
| `--authors <authors>` | `-a` | Comma-separated author emails |
| `--tools <tools>` | `-T` | Comma-separated tool UUIDs or names |
| `--limit <n>` | `-n` | Maximum number of issues (default: 100, max: 1000) |
| `--overview` | `-O` | Show overview counts instead of list |
| `--false-positives [value]` | `-F` | Filter by potential false positives (true, false, or omit) |
| `--ignore` | `-I` | Ignore all issues matching current filters |
| `--ignore-reason <reason>` | `-R` | Reason for ignoring (AcceptedUse, FalsePositive, NotExploitable, TestCode, ExternalCode) |
| `--ignore-comment <comment>` | `-m` | Optional comment when using --ignore |

## Output

Expand Down Expand Up @@ -64,4 +70,4 @@ Six count tables sorted descending by count: Category, Severity, Language, Tag,

## Tests

File: `src/commands/issues.test.ts` — 11 tests.
File: `src/commands/issues.test.ts` — 39 tests.
9 changes: 3 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"prepublishOnly": "npm run update-api && npm run build",
"start": "npx ts-node src/index.ts",
"start:dist": "node dist/index.js",
"fetch-api": "curl https://artifacts.codacy.com/api/codacy-api/52.1.31/apiv3-bundled.yaml -o ./api-v3/api-swagger.yaml --create-dirs",
"fetch-api": "curl https://artifacts.codacy.com/api/codacy-api/55.6.0/apiv3-bundled.yaml -o ./api-v3/api-swagger.yaml --create-dirs",
"generate-api": "rm -rf ./src/api/client && openapi --input ./api-v3/api-swagger.yaml --output ./src/api/client --useUnionTypes --indent 2 --client fetch",
"update-api": "npm run fetch-api && npm run generate-api",
"check-types": "tsc --noEmit"
Expand Down
13 changes: 13 additions & 0 deletions src/commands/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,19 @@ Several helpers are shared between `repository.ts` and `pull-request.ts` via `ut
- **`--unignore` mode** (`-U`): calls `AnalysisService.updateIssueState` with `{ ignored: false }`; skips rendering issue details
- The API uses the string UUID (`issue.issueId`), not the numeric `resultDataId`, for the `updateIssueState` call

## issues command (`issues.ts`)

- Takes `<provider>`, `<organization>`, and `<repository>` as required arguments
- **List mode** (default): card-style format sorted by severity (Error > High > Warning > Info)
- **Overview mode** (`-O, --overview`): six count tables — Category, Severity, Language, Tag, Pattern, Author
- **Filters**: `--branch`, `--patterns`, `--tools`, `--severities`, `--categories`, `--languages`, `--tags`, `--authors`, `--limit`
- **`--false-positives [value]`** (`-F`): tri-state filter — `true` (default when flag present) sends `onlyPotentialFalsePositives: true`, `false` sends `onlyPotentialFalsePositives: false`, omitted sends nothing
- **`--ignore` mode** (`-I`): fetches all issues matching current filters (all pages), then calls `AnalysisService.bulkIgnoreIssues` in batches of 100
- `-R, --ignore-reason`: `AcceptedUse` (default) | `FalsePositive` | `NotExploitable` | `TestCode` | `ExternalCode`
- `-m, --ignore-comment`: optional free-text comment
- Cannot be combined with `--overview` or `--limit`
- Works with any combination of filters; use `--false-positives --ignore` to ignore only FP issues

## finding command (`finding.ts`)

- Takes `<provider>`, `<organization>`, and `<findingId>` (UUID shown on finding cards) as required arguments — **no `<repository>` argument**
Expand Down
Loading
Loading