Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add nightly stale cron #9802

Merged
merged 1 commit into from
Dec 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 30 additions & 15 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
name: stale

on:
schedule:
# Run nightly at 1am EST
- cron: '0 5 * * *'

workflow_dispatch:
inputs:
dry-run:
description: Run the stale action in debug-only mode
default: false
required: false
type: boolean

jobs:
stale:
Expand All @@ -13,30 +23,35 @@ jobs:
- uses: actions/stale@v9
id: stale
with:
debug-only: true
days-before-stale: 90
debug-only: ${{ inputs.dry-run || false }}

days-before-stale: 23
days-before-close: 7
days-before-pr-close: -1 # Never close PRs
ascending: true
operations-per-run: 300

# Ignore all assigned
exempt-all-assignees: false

# Issues
stale-issue-label: 'stale'
exempt-issue-labels: 'blocked,must,should,keep,created-by: Payload team,created-by: Contributor'
stale-issue-message: >
This issue has been marked as stale due to lack of activity. To keep the ticket open, please indicate that it is still relevant in a comment below.
close-issue-message: >
stale-issue-label: stale
exempt-issue-labels: 'prioritized,keep,created-by: Payload team,created-by: Contributor,status: verified'
stale-issue-message: |
This issue has been marked as stale due to lack of activity.

To keep this issue open, please indicate that it is still relevant in a comment below.

close-issue-message: |
This issue was automatically closed due to lack of activity.

# Pull Requests
stale-pr-label: 'stale'
exempt-pr-labels: 'blocked,must,should,keep,created-by: Payload team,created-by: Contributor'
stale-pr-message: >
This PR is stale due to lack of activity. To keep the PR open, please indicate that it is still relevant in a comment below.
close-pr-message: >
stale-pr-label: stale
exempt-pr-labels: 'prioritized,keep,created-by: Payload team,created-by: Contributor'
stale-pr-message: |
This PR is stale due to lack of activity.

To keep the PR open, please indicate that it is still relevant in a comment below.
close-pr-message: |
This pull request was automatically closed due to lack of activity.

# TODO: Add a step to notify team
- name: Print outputs
run: echo ${{ format('{0},{1}', toJSON(steps.stale.outputs.staled-issues-prs), toJSON(steps.stale.outputs.closed-issues-prs)) }}