-
-
Notifications
You must be signed in to change notification settings - Fork 420
Make the optional GitHub star step reliable in setup #1278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -112,7 +112,7 @@ After successful core setup, an interactive setup may offer to star | |
| Eligibility: | ||
|
|
||
| - `gh` is on PATH | ||
| - `gh auth status --active --hostname github.com` succeeds | ||
| - `gh api --hostname github.com /user --silent` succeeds using the account selected by `gh` | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- target lines ---'
sed -n '105,122p' docs/specs/mesh-setup-installer.md
printf '%s\n' '--- related gh wording ---'
rg -n -C 2 'GH_TOKEN|GITHUB_TOKEN|selected by `gh`|credential resolved|gh api.*github.com' docs .github README.md 2>/dev/null || true
printf '%s\n' '--- tracked credential-like files ---'
git ls-files | rg '(^|/)(\.env(\.|$)|.*(credential|token|secret|key).*)' || trueRepository: Mesh-LLM/mesh-llm Length of output: 7055 🌐 Web query:
💡 Result: When using the GitHub CLI (gh), authentication tokens provided via environment variables take precedence over credentials stored in the local system configuration [1][2]. For commands targeting github.com or subdomains of ghe.com, the CLI checks for environment variables in the following order of precedence: 1. GH_TOKEN [1][2] 2. GITHUB_TOKEN [1][2] If neither of these variables is set, the CLI falls back to using stored credentials from the system's authentication configuration [1][2]. For commands targeting a GitHub Enterprise Server (GHES) instance, the CLI checks: 1. GH_ENTERPRISE_TOKEN [2][3] 2. GITHUB_ENTERPRISE_TOKEN [2][3] If these are not set, it will subsequently fall back to checking GH_TOKEN and GITHUB_TOKEN (in that order), and finally, it will use stored credentials if available [2][4]. Key points regarding this behavior: - Explicit Precedence: The GH-prefixed variables (e.g., GH_TOKEN) always take precedence over their GITHUB-prefixed counterparts (e.g., GITHUB_TOKEN) [5]. - Automation: Setting an environment variable avoids interactive authentication prompts and ensures the specified token is used for the command's duration [1][6]. - Stored Credentials: Stored credentials are managed via gh auth login and reside in the system's secure credential store (or a plain-text fallback file) [6][7]. Environment variables override these stored values, making them ideal for headless or CI/CD environments [6][8]. Citations:
Describe the credential source precisely.
🤖 Prompt for AI Agents |
||
| - the authenticated viewer has not already starred the repo | ||
| - a visible interactive prompt is shown | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
Align the default summary with the specification.
github_briefprintsskipped; gh unavailableandskipped; gh not authenticatedin the non-verbose summary.docs/specs/mesh-setup-installer.mdsays exact GitHub skip reasons belong behind--verboseand does not list skipped outcomes in the default summary.Either use a generic
skippedvalue here, or update the specification to permit these exact reasons in default output.🤖 Prompt for AI Agents