Skip to content

docs: add GITHUB_PERSONAL_ACCESS_TOKEN to proxy mode auth token docs#2821

Merged
lpcox merged 2 commits intomainfrom
copilot/update-proxy-mode-env-docs
Mar 30, 2026
Merged

docs: add GITHUB_PERSONAL_ACCESS_TOKEN to proxy mode auth token docs#2821
lpcox merged 2 commits intomainfrom
copilot/update-proxy-mode-env-docs

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 30, 2026

The proxy mode env var table only listed GITHUB_TOKEN/GH_TOKEN, omitting GITHUB_PERSONAL_ACCESS_TOKEN — a commonly used token variable that the proxy already accepts as a third fallback.

Changes

  • docs/ENVIRONMENT_VARIABLES.md: Updated the Proxy Mode Variables table to list all three supported token env vars in their checked priority order and clarify the default value
- | `GITHUB_TOKEN` / `GH_TOKEN` | GitHub auth token for the proxy to forward requests | (required) |
+ | `GH_TOKEN` / `GITHUB_TOKEN` / `GITHUB_PERSONAL_ACCESS_TOKEN` | GitHub auth token for the proxy to forward requests (checked in priority order) | (required for upstream auth) |

Priority order matches internal/cmd/proxy.go: GH_TOKENGITHUB_TOKENGITHUB_PERSONAL_ACCESS_TOKEN.


📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

Copilot AI changed the title [WIP] Update proxy mode environmental variable documentation docs: add GITHUB_PERSONAL_ACCESS_TOKEN to proxy mode auth token docs Mar 30, 2026
Copilot AI requested a review from lpcox March 30, 2026 04:30
@lpcox lpcox marked this pull request as ready for review March 30, 2026 04:42
Copilot AI review requested due to automatic review settings March 30, 2026 04:42
@lpcox lpcox merged commit 7e969ac into main Mar 30, 2026
11 checks passed
@lpcox lpcox deleted the copilot/update-proxy-mode-env-docs branch March 30, 2026 04:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the proxy-mode environment variable documentation so users can provide GitHub auth using GITHUB_PERSONAL_ACCESS_TOKEN in addition to GH_TOKEN and GITHUB_TOKEN, matching the proxy command’s fallback resolution behavior.

Changes:

  • Document GITHUB_PERSONAL_ACCESS_TOKEN as an accepted proxy auth token env var.
  • Reorder token env vars to reflect checked priority order.
  • Clarify the token row’s default/requirement wording (needs a small correction per inline comment).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

| `GITHUB_API_URL` | Explicit GitHub API endpoint (e.g., `https://copilot-api.mycompany.ghe.com`); used by proxy to set upstream target | (auto-derived) |
| `GITHUB_SERVER_URL` | GitHub server URL; proxy auto-derives API endpoint: `*.ghe.com` → `copilot-api.*.ghe.com`, GHES → `<host>/api/v3`, `github.com` → `api.github.com` | (falls back to `api.github.com`) |
| `GITHUB_TOKEN` / `GH_TOKEN` | GitHub auth token for the proxy to forward requests | (required) |
| `GH_TOKEN` / `GITHUB_TOKEN` / `GITHUB_PERSONAL_ACCESS_TOKEN` | GitHub auth token for the proxy to forward requests (checked in priority order) | (required for upstream auth) |
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Default column says this token env var is “(required for upstream auth)”, but awmg proxy can run without any of these env vars because it forwards the client’s Authorization header by default, and only uses these as a fallback when --github-token/env is set (see internal/proxy/proxy.go where Config.GitHubToken is documented as a fallback). Please update the description/default to reflect that this env var is optional and only needed when the client isn’t providing auth headers (or when you want to override them).

Suggested change
| `GH_TOKEN` / `GITHUB_TOKEN` / `GITHUB_PERSONAL_ACCESS_TOKEN` | GitHub auth token for the proxy to forward requests (checked in priority order) | (required for upstream auth) |
| `GH_TOKEN` / `GITHUB_TOKEN` / `GITHUB_PERSONAL_ACCESS_TOKEN` | Optional GitHub auth token used by the proxy when the client does not provide an `Authorization` header, or when you want to override client-provided auth (checked in priority order; used as a fallback for `--github-token`) | (optional; only used when client auth is not provided or is overridden) |

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

📚 Documentation Reconciliation Report - 2026-03-30

3 participants