Skip to content

Commit

Permalink
[FIX] Make a better use of stale action operations
Browse files Browse the repository at this point in the history
Before this patch, as you can see in [the logs attached here][1], the bot ran 3 times.

The last one is untouched, but the other two are now merged into a single execution. This way we do less API calls and get it running faster. Also the logs will become less confusing.

[1]: OCA/web#2037 (review)
  • Loading branch information
Jairo Llopis authored and yajo committed Sep 27, 2021
1 parent a39a21f commit 1077a53
Showing 1 changed file with 13 additions and 20 deletions.
33 changes: 13 additions & 20 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
# 120+30 day stale policy for PRs
# * Except PRs marked as "no stale"
- name: Stale PRs policy
- name: Stale PRs and issues policy
uses: actions/stale@v4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
exempt-pr-labels: "no stale"
days-before-stale: 120
days-before-close: 30
days-before-issue-stale: -1
days-before-issue-close: -1
# General settings.
remove-stale-when-updated: true
# Pull Requests settings.
# 120+30 day stale policy for PRs
# * Except PRs marked as "no stale"
days-before-pr-stale: 120
days-before-pr-close: 30
exempt-pr-labels: "no stale"
stale-pr-label: "stale"
stale-pr-message: >
There hasn't been any activity on this pull request in the past 4 months, so
Expand All @@ -28,19 +28,12 @@ jobs:
If you want this PR to never become stale, please ask a PSC member to apply
the "no stale" label.
# 180+30 day stale policy for open issues
# * Except Issues marked as "no stale"
- name: Stale Issues policy
uses: actions/stale@v4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
# Issues settings.
# 180+30 day stale policy for open issues
# * Except Issues marked as "no stale"
days-before-issue-stale: 180
days-before-issue-close: 30
exempt-issue-labels: "no stale,needs more information"
days-before-stale: 180
days-before-close: 30
days-before-pr-stale: -1
days-before-pr-close: -1
remove-stale-when-updated: true
stale-issue-label: "stale"
stale-issue-message: >
There hasn't been any activity on this issue in the past 6 months, so it has
Expand Down

0 comments on commit 1077a53

Please sign in to comment.