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

オープン 初心者向け
#342 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
76/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
github, javascript

調査の方向性

src/adapters/github.js:256 の404処理と src/oauth/member-access.js の認証情報フローから始め、ホスト型サインインのエラーがどこでWebメッセージに変換されるかを見つけます。CLIの出力とログには技術的な詳細を残し、このGitHubサインインのケースでは平易なメッセージを表示します。Webページに「PAT」が表示されなくなり、メンバーがアクセスを得る方法をメッセージで説明できたら完了です。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
JavaScript
スター
1
フォーク
2
平均マージ
1日 19時間
マージ済み PR(30日)
62

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

StatsLateral/teamctx のほかの issue

StatsLateral/teamctx の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。