From 142c8ce48521e46c8fd54b2a25554702f26adaec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hozza?= Date: Wed, 6 Sep 2023 11:34:51 +0200 Subject: [PATCH] Add common stale action MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also update README. Signed-off-by: Tomáš Hozza --- README.md | 9 ++++++++- action.yml | 21 +++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 action.yml diff --git a/README.md b/README.md index 48abfcd..8c6f224 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,9 @@ # common-stale-action -Common stale action for all osbuild repositories. + +Common stale action for all osbuild repositories. This actions makes it easy to adjust stale settings for all osbuild repositories in one place. + +For now, only pull requests are checked. The action will: + +* Mark pull requests as stale if they have not been updated for 30 days by adding the `Stale` label. +* Remove the `Stale` label if a pull request is updated. +* Close pull requests that have been stale for 7 days. diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..8ceb6d4 --- /dev/null +++ b/action.yml @@ -0,0 +1,21 @@ +name: "Close stale PRs" +description: "Common stale PRs action for all osbuild repositories" + +inputs: + token: + description: "A GitHub token for marking stale PRs and closing them" + required: true + +runs: + using: "composite" + steps: + - uses: actions/stale@v8 + with: + repo-token: "${{ inputs.TOKEN }}" + stale-pr-message: 'This PR is stale because it has been open 30 days with no activity. Remove "Stale" label or comment or this will be closed in 7 days.' + close-pr-message: 'This PR was closed because it has been stalled for 30+7 days with no activity.' + days-before-stale: 30 + days-before-close: 7 + # Do not touch any issues + days-before-issue-stale: -1 + days-before-issue-close: -1