Skip to content
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

feat(logs): add a new log when an issue consumed at least one operation #386

Merged
merged 41 commits into from
May 3, 2021
Merged
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
c21e2f2
Merge pull request #1 from actions/main
C0ZEN Nov 22, 2020
c913fa4
Merge pull request #2 from actions/main
C0ZEN Jan 16, 2021
9cf9bf2
Merge pull request #3 from actions/main
C0ZEN Jan 16, 2021
f11f623
Merge pull request #4 from actions/main
C0ZEN Jan 16, 2021
0f1457a
Merge pull request #5 from actions/main
C0ZEN Jan 17, 2021
fef6333
Merge pull request #6 from actions/main
C0ZEN Jan 18, 2021
e1ba62c
Merge pull request #7 from actions/main
C0ZEN Jan 23, 2021
abab4a6
Merge pull request #8 from actions/main
C0ZEN Feb 9, 2021
920683c
Merge pull request #9 from actions/main
C0ZEN Feb 13, 2021
a98474b
Merge pull request #10 from actions/main
C0ZEN Feb 18, 2021
915ed27
Merge pull request #11 from actions/main
C0ZEN Mar 1, 2021
4b097b3
Merge pull request #12 from actions/main
C0ZEN Mar 1, 2021
5575ade
docs(only-labels): enhance the docs and fix duplicate (#341)
C0ZEN Mar 4, 2021
b806328
build(deps-dev): bump @typescript-eslint/eslint-plugin (#342)
dependabot[bot] Mar 4, 2021
c6b2c30
build(deps): bump @octokit/rest from 18.3.0 to 18.3.2 (#350)
dependabot[bot] Mar 4, 2021
5a8ec1e
Merge pull request #14 from actions/main
C0ZEN Mar 4, 2021
6c29691
test: add more coverage for the stale label behaviour (#352) (#15)
C0ZEN Mar 5, 2021
d485d43
test: add more coverage for the stale label behaviour (#352) (#17)
C0ZEN Mar 9, 2021
25621f6
test: add more coverage for the stale label behaviour (#352) (#18)
C0ZEN Mar 9, 2021
6257990
docs(operations-per-run): improve the doc for this option
C0ZEN Mar 10, 2021
c38af01
feat(logs): add a new log when an issue consumed at least one operation
C0ZEN Mar 10, 2021
173c540
Merge branch 'main' into feature/log-operations-per-issue
C0ZEN Mar 10, 2021
d0d072d
chore(readme): improve the operations per run
C0ZEN Mar 17, 2021
6d7053e
chore(readme): improve the operations per run
C0ZEN Mar 17, 2021
4236350
chore(readme): improve the operations per run
C0ZEN Mar 17, 2021
e7b8a38
chore(readme): improve the operations per run
C0ZEN Mar 17, 2021
304e352
chore(readme): improve the operations per run
C0ZEN Mar 17, 2021
c78dbd5
chore(readme): improve the operations per run
C0ZEN Mar 19, 2021
9a29082
Merge branch 'main' into feature/log-operations-per-issue
C0ZEN Apr 27, 2021
ee8f729
Typo in how to perform check for specific labels (#357)
romainr Apr 28, 2021
94499a2
feat(any-of-labels): add 2 new options to customize for issues/PRs (#…
C0ZEN Apr 28, 2021
8d43c50
feat(logs): enhance the logs for assignees and milestones (#382)
C0ZEN Apr 28, 2021
8025ac6
Merge branch 'main' into feature/log-operations-per-issue
C0ZEN Apr 28, 2021
72abf2b
Merge branch 'main' into feature/log-operations-per-issue
C0ZEN Apr 28, 2021
2570e86
style(typo): fix typo plural issue
C0ZEN Apr 28, 2021
ee986e5
Merge branch 'main' into feature/log-operations-per-issue
C0ZEN Apr 30, 2021
385b1d6
style(naming): rename two methods
C0ZEN Apr 30, 2021
783c103
chore(error): remove a potential useless throw of error
C0ZEN Apr 30, 2021
7fae5fa
style(naming): rename one method
C0ZEN Apr 30, 2021
4cf12ba
refactor(issue): change the way to count the operations
C0ZEN Apr 30, 2021
96bee75
refactor(operations): create a method to reduce code duplication
C0ZEN May 1, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 16 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Every argument is optional.

| Input | Description |
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `repo-token` | PAT(Personal Access Token) for authorizing repository.<br>_Defaults to **${{ github.token }}**_. |
| `repo-token` | PAT (Personal Access Token) for authorizing the repository.<br>_Defaults to **${{ github.token }}**_. |
| `days-before-stale` | Idle number of days before marking an issue/PR as stale.<br>_Defaults to **60**_. |
| `days-before-issue-stale` | Idle number of days before marking an issue as stale.<br>_Override `days-before-stale`_. |
| `days-before-pr-stale` | Idle number of days before marking an PR as stale.<br>_Override `days-before-stale`_. |
Expand All @@ -37,6 +37,8 @@ Every argument is optional.
| `remove-stale-when-updated` | Remove stale label from issue/PR on updates or comments.<br>_Defaults to **true**_. |
| `remove-issue-stale-when-updated` | Remove stale label from issue on updates or comments.<br>_Defaults to **true**_.<br>_Override `remove-stale-when-updated`_. |
| `remove-pr-stale-when-updated` | Remove stale label from PR on updates or comments.<br>_Defaults to **true**_.<br>_Override `remove-stale-when-updated`_. |
| `remove-issue-stale-when-updated` | Remove stale label from issue on updates or comments.<br>_Defaults to **true**_.<br>_Override `remove-stale-when-updated`_. |
| `remove-pr-stale-when-updated` | Remove stale label from PR on updates or comments.<br>_Defaults to **true**_.<br>_Override `remove-stale-when-updated`_. |
| `debug-only` | Dry-run on action.<br>_Defaults to **false**_. |
| `ascending` | Order to get issues/PR.<br>`true` is ascending, `false` is descending.<br>_Defaults to **false**_. |
| `skip-stale-issue-message` | Skip adding stale message on stale issue.<br>_Defaults to **false**_. |
Expand All @@ -61,11 +63,22 @@ Every argument is optional.

#### operations-per-run

Used to limit the number of operations made with the GitHub API to avoid reaching the [rate limit](https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting).
_Context:_
This action performs some API calls to GitHub to fetch or close issues and pull requests, set or update labels, add comments, delete branches, etc.
These operations are made in a very short period of time - because the action is very fast to run - and can be numerous based on your project action configuration and the quantity of issues and pull requests within it.
GitHub has a [rate limit](https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting) and if reached will block all of these API calls for one hour (or API calls from other actions using the same user (a.k.a: the github-token from the [repo-token](#repo-token) option)).
This option helps you to stay within the GitHub rate limits, as you can use this option to limit the number of operations for a single run.

_Purpose:_
This option aims to limit the number of operations made with the GitHub API to avoid reaching the [rate limit](https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting).

Based on your project, your GitHub business plan and the date of the cron job you set for this action, you can increase this limit to a higher number.
If you are not sure which is the right value for you or if the default value is good enough, you could enable the logs and look at the end of the stale action.
If you reached the limit, you will see a warning message in the logs, telling you that you should increase the number of operations.
If you choose not to increase the limit, you might end up with un-processed issues or pull requests after a stale action run.

When [debugging](#Debugging), you can set it to a much higher number like `1000` since there will be fewer operations made with the GitHub API.
Only the actor and the batch of issues (100 per batch) will consume the operations.
Only the [actor](#repo-token) and the batch of issues (100 per batch) will consume the operations.

Default value: `30`

Expand Down