Plain-language message when a GitHub sign-in can't read a project (replace "PAT lacks access")

Aperta Adatta ai principianti
#342 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
76/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
github, javascript

Direzione di ricerca

Inizia dalla gestione del 404 in src/adapters/github.js:256 e dal flusso delle credenziali in src/oauth/member-access.js, poi individua dove gli errori di accesso ospitato vengono convertiti in messaggi web. Mantieni i dettagli tecnici nell’output della CLI e nei log, e mostra un messaggio in linguaggio semplice per questo caso di accesso a GitHub. Il lavoro è completato quando le pagine web non mostrano più «PAT» e il messaggio spiega come il membro può ottenere l’accesso.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

What

A member invited by email who signs in with a new GitHub account (not a collaborator on the repo) sees:

Something went wrong — StatsLateral/ could not be read: github: repo StatsLateral/ not found (or PAT lacks access)

The message comes from src/adapters/github.js:256 (a 404 on a private repo). It is accurate for a developer but means nothing to a non-technical member, who has no idea what a PAT is.

Why it happens

Access is granted to the email on the roster. A Google sign-in reaches the repo through the project's lent credential (src/oauth/member-access.js); a GitHub sign-in uses the person's own token, and GitHub returns 404 for a private repo they have no access to. The behaviour is correct (the private repo stays private). Only the message is poor.

Proposal

When a 404 happens on a hosted GitHub-sign-in session, show a plain message instead, for example: "You are signed in with GitHub, but this project was shared with your email address. Sign in with Google using the invited email, or ask the project manager to add your GitHub account." Keep the technical detail for the CLI and logs. Drop "PAT" from anything shown on a web page.

Existing open source first

None needed: this is copy and error mapping in our own views, not new plumbing.

Lingua principale
JavaScript
Stelle
1
Fork
2
Merge medio
1g 19h
PR unite (30g)
62

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di StatsLateral/teamctx

Tutte le issue di StatsLateral/teamctx

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.