You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`--token`,<br/>`-t`| Your GitHub Personal Access Token | Environment variable `GITHUB_TOKEN`|
83
-
|`--hostname`| GitHub Enterprise Server hostname or GitHub Enterprise Cloud with Data Residency endpoint:<br/>- For GitHub Enterprise Server: `github.example.com`<br/>- For GitHub Enterprise Cloud with Data Residency: `api.example.ghe.com`|`api.github.com`|
1. If no hostname is provided, use the public API.
150
+
2. If the hostname ends with `.ghe.com` (GitHub Enterprise Cloud with Data Residency):
151
+
152
+
- If it already starts with `api.`, it's used as-is.
153
+
- Otherwise `api.` is prefixed (no `/api/v3` suffix is added).
154
+
155
+
3. All other custom hostnames are treated as GitHub Enterprise Server and `/api/v3` is appended.
156
+
4. Protocol, trailing slashes, mixed case, and extraneous path segments are stripped/normalized.
157
+
158
+
You can safely pass either the regional base (`example.ghe.com`) or the explicit API host (`api.example.ghe.com`); both resolve to the correct endpoint.
159
+
160
+
> Tip: If your environment migrates between public GitHub and GHES/GHEC+DR, you can centralize logic by always providing `--hostname` and letting the tool normalize.
161
+
133
162
## Examples
134
163
135
164
Here are some common usage scenarios to help you get started:
0 commit comments