Skip to content

Commit 4baae66

Browse files
committed
Add documentation for GitHub rate limits and PAT usage
Added a new documentation page explaining how Evergreen interacts with GitHub rate limits, how to use personal access tokens for authenticated API requests, and environment variable configuration. Updated the sidebar navigation to include the new page and added an illustrative image.
1 parent f66e979 commit 4baae66

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

.vitepress/config.mts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ export default defineConfig({
5858
{ text: 'Download installers', link: '/save' },
5959
{ text: 'Test URLs', link: '/test' },
6060
{ text: 'Export version information', link: '/export' },
61+
{ text: 'Working with GitHub rate limits', link: '/github' },
6162
{ text: 'Example usage', link: '/examples' }
6263
]
6364
},

docs/github.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
layout: doc
3+
---
4+
# Working with GitHub rate limits
5+
6+
Over 150 applications supported by Evergreen are hosted on GitHub repositories or pull data from a GitHub repository for determining the latest version. Evergreen makes use of the GitHub REST API when requesting details for these applications.
7+
8+
GitHub implements rate limits on the API for unauthenticated requests. See [Rate limits for the REST API](https://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api) for details.
9+
10+
## Authenticating to the GitHub API
11+
12+
For environments that may consume more than 60 requests to the API in an hour, Evergreen supports authenticated requests by use of [personal access tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). [Fine-grained personal access tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token) should be used.
13+
14+
A token that has read-only access to public repositories only is recommended. This should enable you to use a long expiry time; however, secure management of this token is recommended.
15+
16+
![Fine-grained personal access token](/img/github-pat.png)
17+
18+
## GITHUB_TOKEN environment variable
19+
20+
Evergreen will use the token stored in the `GITHUB_TOKEN` or `GH_TOKEN` environment variables. Setting either of these variables with the value of the personal access token will allow Evergreen to use the token when querying the GitHub API, significantly increasing the number of available requests.
21+
22+
Additionally, if you are running Evergreen in a GitHub Actions workflow, the `GITHUB_TOKEN` will be used, so no additional personal access tokens are required - [Use GITHUB_TOKEN for authentication in workflows](https://docs.github.com/en/actions/tutorials/authenticate-with-github_token).

docs/public/img/github-pat.png

73.1 KB
Loading

0 commit comments

Comments
 (0)