Skip to content

Commit

Permalink
Try automatically marking PRs as stale
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelmior committed Sep 16, 2024
1 parent 740f2ee commit 682c285
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Mark and close stale pull requests

on:
schedule:
- cron: '30 3 * * *' # Run at 3:30 UTC nightly
workflow_dispatch:
inputs:
dryRun:
description: 'Dry run'
required: true
default: true
type: boolean
operationsPerRun:
description: 'Max GitHub API operations'
required: true
default: 30
type: number

permissions: read-all
jobs:
stale:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-pr-message: 'This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 90 days if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@calcite.apache.org list. Thank you for your contributions.'
close-pr-message: 'This pull request has been closed due to lack of activity. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.'
stale-pr-label: 'stale'
days-before-pr-stale: 30
days-before-pr-close: 90
days-before-issue-close: -1
days-before-issue-stale: -1
exempt-pr-labels: "pinned"
debug-only: ${{ inputs.dryRun || false }}
operations-per-run: ${{ inputs.operationsPerRun || 100 }}

0 comments on commit 682c285

Please sign in to comment.