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

未关闭 适合新手
#342 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
76/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
github, javascript

调研方向

从 src/adapters/github.js:256 的404处理和 src/oauth/member-access.js 中的凭据流程入手,然后找到托管式登录错误映射为网页消息的位置。在 CLI 输出和日志中保留技术细节,并为此 GitHub 登录场景显示一条通俗易懂的消息。完成标准是网页不再显示“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 小时
30 天内合并 PR
62

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

StatsLateral/teamctx 的其他 Issue

查看 StatsLateral/teamctx 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。