github / github/accessibility-scanner

Documentation Update for First Run ➔ gh-cache Branch, cache_key File, and JSON Escaping Guidance

Offen
#37 4 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
awaiting-reporter
Vorherrschende Sprache
TypeScript
Sterne
369
Forks
40
Ø Merge
1 T. 9 Std.
Gemergte PRs (30 T.)
10

Beschreibung

Great tool! It works for me now. However, I ran into a few undocumented setup issues during the first run that caused the workflow to exit with code 2.

**1️⃣ Missing `gh-cache` branch**

The first run failed with:

> Branch `gh-cache` does not exist

Creating a branch named `gh-cache` resolved this.

**2️⃣ Missing cache file matching `cache_key`**

Next error on report:

> `cache-key-value` not found in cache

Creating and pushing an empty file onto the `gh-cache` branch whose name matches the `cache_key` value in the workflow YAML fixed this issue.

**3️⃣ JSON escaping issue in action.yml file in codebase:**

Final error in report:

The line `echo "issues=$issues" >> "$GITHUB_OUTPUT"` fails whenever HTML contains quotations. This likely happens due to the line trying to echo out unescaped quotes.

Proposed fix:

```
issues_escaped=$(echo "$issues" | jq -c . | sed 's/%/%25/g; s/\r/%0D/g; s/\n/%0A/g')
echo "issues=$issues_escaped" >> "$GITHUB_OUTPUT"
```

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Review action.yml and the workflow's cache_key setup first, then identify where first-run requirements are documented. Document creation of the gh-cache branch and matching cache file, and verify the report output handles HTML quotation marks without causing the workflow to exit with code 2.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
github-actions
Bereich
ci-cd, documentation
Issue-Typ
Dokumentation
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.