diff --git a/.github/workflows/labels.yml b/.github/workflows/labels.yml index f7090fa246..5fa69ccd0b 100644 --- a/.github/workflows/labels.yml +++ b/.github/workflows/labels.yml @@ -35,3 +35,4 @@ jobs: label prx c5def5 'Other PRX libraries' label build bfd4f2 'CMake, submodules, 3rdparty' label docs 0075ca 'Documentation' + label stale ededed 'Conflicting with main and no activity for 7 days' diff --git a/.github/workflows/stale-conflicts.yml b/.github/workflows/stale-conflicts.yml new file mode 100644 index 0000000000..4eee09a40e --- /dev/null +++ b/.github/workflows/stale-conflicts.yml @@ -0,0 +1,28 @@ +name: Stale conflicts + +on: + schedule: + - cron: '30 3 * * *' + workflow_dispatch: + +permissions: {} + +jobs: + warn: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: actions/stale@v11 + with: + only-pr-labels: needs rebase + days-before-issue-stale: -1 + days-before-issue-close: -1 + days-before-pr-stale: 7 + days-before-pr-close: -1 + stale-pr-label: stale + stale-pr-message: 'This pull request has conflicted with `main` and had no activity for 7 days. Rebase it on current `main` so it can be reviewed and merged. It will not be closed automatically.' + remove-pr-stale-when-updated: true + exempt-draft-pr: true + operations-per-run: 200 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 85fc90d0e6..8800bd05e5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -53,6 +53,7 @@ The [pull request template](.github/pull_request_template.md) is the checklist f - Open pull requests per author are limited by how many of theirs are merged into `main`: 1 with none merged, 20 with at least 1, no limit from 20. A pull request opened or reopened over the limit is closed automatically; reopen it once another one is merged or closed. - Before starting, check that no open pull request already implements the same functions. - Keep the branch up to date with `main` and resolve conflicts yourself; rebasing and force-pushing is fine. +- A pull request that conflicts with `main` and has no activity for 7 days is labeled `stale` with a reminder. It is not closed. - If a pull request needs another one first, say so on the checklist line (`Depends on: #N`; `none` otherwise). - If a pull request fixes a stop or a wrong result seen on a title, name it on the checklist line with the title ID and its [Game bring-up](https://github.com/boykopovar/AnyPS5/discussions/categories/game-bring-up) discussion (`Unblocks: PPSA01325 #3232`; `none` otherwise). Reviewers review these first. - Fixes a title needs go to `main` as pull requests. A Game bring-up discussion lists the open pull requests and local changes the title still needs; update the list when one is merged, closed or replaced.