Skip to content

Commit

Permalink
Development: Add GitHub bot to mark pull requests as stale (ls1intu…
Browse files Browse the repository at this point in the history
  • Loading branch information
TheZoker authored Aug 22, 2022
1 parent a8ea90a commit 87b0f68
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/pullrequest-stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Stale
on:
schedule:
- cron: "0 12 * * *"

jobs:
stale:
if: github.repository_owner == 'ls1intum'
runs-on: ubuntu-latest
steps:
- name: Check for stale PRs
uses: actions/stale@v5
with:
days-before-stale: 7
days-before-close: 14
# Disable issue checking, only PR
days-before-issue-stale: -1
remove-stale-when-updated: true
stale-pr-label: "stale"
exempt-pr-labels: "no-stale"
stale-pr-message: >
There hasn't been any activity on this pull request recently.
Therefore, this pull request has been automatically marked as stale
and will be closed if no further activity occurs within **seven** days.
Thank you for your contributions.
14 changes: 14 additions & 0 deletions docs/dev/guidelines/development-process.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,17 @@ Iterate steps 3 & 4 until ready for merge (all reviewers approve (thumbs up))
--------
A project maintainer merges your changes into the ``develop`` branch.



Stale Bot
=========

If the pull request doesn't have any activity for at least 7 days, the stale bot will mark the PR as `stale`.
The `stale` status can simply be removed by adding a comment or a commit to the PR.
After the PR is marked as `stale`, the bot waits another 14 days until the PR will be closed (21 days in total).
Adding activity to the PR will remove the `stale` label again and reset the stale timer.
To prevent the bot from adding the `stale` label to the PR in the first place, the `no-stale` label can be used.
This label should only be utilized if the PR is blocked by another PR or the PR needs help from another developer.

A full documentation on this bit can be found here:
https://github.com/actions/stale

0 comments on commit 87b0f68

Please sign in to comment.