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