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
Copy file name to clipboardExpand all lines: api/ruby/find-inactive-members/README.md
+17-1Lines changed: 17 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,8 +32,10 @@ gem install octokit faraday
32
32
33
33
The `OCTOKIT_ACCESS_TOKEN` is required in order to see activities on private repositories. Also note that GitHub.com has an rate limit of 60 unauthenticated requests per hour, which this tool can easily exceed. Access tokens can be generated at https://github.com/settings/tokens. The `OCTOKIT_API_ENDPOINT` isn't required if connecting to GitHub.com, but is required if connecting to a GitHub Enterprise instance.
34
34
35
+
`OCTOKIT_ACCESS_TOKEN` needs the scopes `read:org`, `read:user`, `repo`, and `user:email`.
36
+
35
37
```shell
36
-
export OCTOKIT_ACCESS_TOKEN=00000000000000000000000 # Required if looking for activity in private repositories.
38
+
export OCTOKIT_ACCESS_TOKEN=00000000000000000000000 # Required if looking for activity in private repositories.
37
39
export OCTOKIT_API_ENDPOINT="https://<your_github_enterprise_instance>/api/v3"# Not required if connecting to GitHub.com.
38
40
```
39
41
@@ -55,3 +57,17 @@ Members are defined as inactive if they **have not performed** any of the follow
55
57
- Merged or pushed commits into the default branch
56
58
- Opened an Issue or Pull Request
57
59
- Commented on an Issue or Pull Request
60
+
61
+
## Rate Limit
62
+
63
+
The script will use the following rate limit headers returned by the API to throttle requests in order to stay within the rate limit. You can disable throttling using the `-t` option.
64
+
65
+
| Header name | Description |
66
+
| --- | --- |
67
+
|`x-ratelimit-limit`| The maximum number of requests that you can make per hour |
68
+
|`x-ratelimit-remaining`| The number of requests remaining in the current rate limit window |
69
+
|`x-ratelimit-used`| The number of requests you have made in the current rate limit window |
70
+
|`x-ratelimit-reset`| The time at which the current rate limit window resets, in UTC epoch seconds |
71
+
|`x-ratelimit-resource`| The rate limit resource that the request counted against. |
72
+
73
+
For more information about the different resources, see [REST API endpoints for rate limits](https://docs.github.com/en/rest/rate-limit/rate-limit#get-rate-limit-status-for-the-authenticated-user).
info"Throttling: Limited to #{ThrottleMiddleware::MAX_REQUESTS_PER_HOUR} requests/hour (#{ThrottleMiddleware::MIN_DELAY_SECONDS.round(2)}s min delay)\n"
0 commit comments