master
md 44 lines 1.39 KB
Rendered Raw
1 # Triage `action_required` Without A Codacy Token
2
3 Use this when the GitHub check-run says Codacy is `action_required`, but
4 GitHub exposes no annotations and the local checkout has no `.env` with
5 `CODACY_TOKEN`.
6
7 1. Get the Codacy check-run summary from GitHub:
8
9 ```bash
10 gh api repos/netdata/netdata/check-runs/<check-run-id> \
11 --jq '{conclusion:.conclusion, output:.output, details_url:.details_url}'
12 ```
13
14 2. Fetch public PR issue details from Codacy v3:
15
16 ```bash
17 curl -fsS \
18 "https://api.codacy.com/api/v3/analysis/organizations/gh/netdata/repositories/netdata/pull-requests/<PR>/issues?limit=100" \
19 -o .local/audits/codacy/pr-<PR>-public-issues.json
20 ```
21
22 3. Show only still-blocking issues:
23
24 ```bash
25 jq -r '
26 .data[]
27 | select(.deltaType == "Added")
28 | [
29 .commitIssue.filePath,
30 .commitIssue.lineNumber,
31 .commitIssue.patternInfo.id,
32 .commitIssue.message,
33 .commitIssue.lineText
34 ]
35 | @tsv
36 ' .local/audits/codacy/pr-<PR>-public-issues.json
37 ```
38
39 4. Ignore `deltaType == "Fixed"` entries for the current blocker. They are
40 historical issue records that Codacy already considers resolved.
41
42 Safety note: the public response can contain `commitInfo` fields with personal
43 metadata. Keep raw dumps under `.local/audits/codacy/`, which is gitignored,
44 and do not copy names or email addresses into committed artifacts.