benchmark-action / benchmark-action/github-action-benchmark

Action requires GITHUB_TOKEN even for public repositories

Offen
#331 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
TypeScript
Sterne
1.3k
Forks
184
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

If the action is configured not to push and the configured repository is public, then the `GITHUB_TOKEN` should not be required, since the action should be able to clone the repository without it.

Currently the action fails due to the following validation, not because the action can't actually clone the repo.

```js
if (ghRepository) {
validateGitHubToken('gh-repository', githubToken, 'to clone the repository');
}
```

This is undesirable because it unnecessarily leads users to create PATs or fine-grained tokens, increasing their security exposure.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Start at the shown `ghRepository` validation and trace how repository cloning and push configuration are handled. The change is done when a public repository configured not to push can be cloned without `GITHUB_TOKEN`, while configurations that still require authentication continue to validate it.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
github-actions, typescript
Bereich
ci-cd, devops
Issue-Typ
Bug
Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
52/100

Neue Issues direkt in Ihr Postfach

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