Skip to content

Commit

Permalink
Add common stale action
Browse files Browse the repository at this point in the history
Also update README.

Signed-off-by: Tomáš Hozza <[email protected]>
  • Loading branch information
thozza committed Sep 6, 2023
1 parent 50a111f commit 7a21e00
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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.
21 changes: 21 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 7a21e00

Please sign in to comment.