diff --git a/.github/workflows/close-stale-feature-requests.yml b/.github/workflows/close-stale-feature-requests.yml deleted file mode 100644 index 301dbff620c602..00000000000000 --- a/.github/workflows/close-stale-feature-requests.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: Close stale feature requests -on: - workflow_dispatch: - schedule: - # Run every day at 1:00 AM UTC. - - cron: 0 1 * * * - -# yamllint disable rule:empty-lines -env: - CLOSE_MESSAGE: > - There has been no activity on this feature request - and it is being closed. If you feel closing this issue is not the - right thing to do, please leave a comment. - - - For more information on how the project manages - feature requests, please consult the - [feature request management document](https://github.com/nodejs/node/blob/HEAD/doc/contributing/feature-request-management.md). - - WARN_MESSAGE: > - There has been no activity on this feature request for - 5 months. To help maintain relevant open issues, please - add the https://github.com/nodejs/node/labels/never-stale - label or close this issue if it should be closed. If not, - the issue will be automatically closed 6 months after the - last non-automated comment. - - For more information on how the project manages - feature requests, please consult the - [feature request management document](https://github.com/nodejs/node/blob/HEAD/doc/contributing/feature-request-management.md). -# yamllint enable - -permissions: - contents: read - -jobs: - stale: - permissions: - issues: write # for actions/stale to close stale issues - pull-requests: write # for actions/stale to close stale PRs - if: github.repository == 'nodejs/node' - runs-on: ubuntu-latest - steps: - - uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - days-before-stale: 180 - days-before-close: 30 - stale-issue-label: stale - close-issue-message: ${{ env.CLOSE_MESSAGE }} - stale-issue-message: ${{ env.WARN_MESSAGE }} - only-labels: feature request - exempt-issue-labels: never-stale - # max requests it will send per run to the GitHub API before it deliberately exits to avoid hitting API rate limits - operations-per-run: 500 - remove-stale-when-updated: true diff --git a/.github/workflows/close-stale-pull-requests.yml b/.github/workflows/close-stale-pull-requests.yml deleted file mode 100644 index b18cd5c37e69c4..00000000000000 --- a/.github/workflows/close-stale-pull-requests.yml +++ /dev/null @@ -1,59 +0,0 @@ -name: Close stale pull requests -on: - workflow_dispatch: - inputs: - endDate: - description: stop processing PRs after this date - required: false - type: string - -# yamllint disable rule:empty-lines -env: - CLOSE_MESSAGE: > - This pull request was opened more than a year ago and there has - been no activity in the last 6 months. We value your contribution - but since it has not progressed in the last 6 months it is being - closed. If you feel closing this pull request is not the right thing - to do, please leave a comment. - - WARN_MESSAGE: > - This pull request was opened more than a year ago and there has - been no activity in the last 5 months. We value your contribution - but since it has not progressed in the last 5 months it is being - marked stale and will be closed if there is no progress in the - next month. If you feel that is not the right thing to do please - comment on the pull request. -# yamllint enable - -permissions: - contents: read - -jobs: - stale: - permissions: - pull-requests: write # for actions/stale to close stale PRs - if: github.repository == 'nodejs/node' - runs-on: ubuntu-latest - steps: - - name: Set default end date which is 1 year ago - run: echo "END_DATE=$(date --date='525600 minutes ago' --rfc-2822)" >> "$GITHUB_ENV" - - name: if date set in event override the default end date - env: - END_DATE_INPUT_VALUE: ${{ github.event.inputs.endDate }} - if: ${{ github.event.inputs.endDate != '' }} - run: echo "END_DATE=$END_DATE_INPUT_VALUE" >> "$GITHUB_ENV" - - uses: mhdawson/stale@453d6581568dc43dbe345757f24408d7b451c651 # PR to add support for endDate - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - end-date: ${{ env.END_DATE }} - days-before-issue-stale: -1 - days-before-issue-close: -1 - days-before-stale: 150 - days-before-close: 30 - stale-issue-label: stale - close-issue-message: ${{ env.CLOSE_MESSAGE }} - stale-issue-message: ${{ env.WARN_MESSAGE }} - exempt-pr-labels: never-stale - # max requests it will send per run to the GitHub API before it deliberately exits to avoid hitting API rate limits - operations-per-run: 500 - remove-stale-when-updated: true diff --git a/.github/workflows/close-stale.yml b/.github/workflows/close-stale.yml new file mode 100644 index 00000000000000..5ca87728f57362 --- /dev/null +++ b/.github/workflows/close-stale.yml @@ -0,0 +1,46 @@ +name: Close stale pull requests +on: + workflow_dispatch: + schedule: + # Run every day at 1:00 AM UTC. + - cron: 0 1 * * * +# yamllint disable rule:empty-lines +env: + CLOSE_MESSAGE: > + There hasn't been any activity on this issue/PR for over 8 months. + We appreciate your contribution, but since there hasn't been any + progress recently, we're closing it. If you disagree with this + decision, please leave a comment. + + WARN_MESSAGE: > + There hasn't been any activity on this issue/PR for over 7 months. + We appreciate your contribution, but since there hasn't been any + progress recently, we're closing it in **30 days**. If you + disagree with this decision, please leave a comment. +# yamllint enable + +permissions: + contents: read + issues: write + pull-requests: write + +jobs: + stale: + if: github.repository == 'nodejs/node' + runs-on: ubuntu-latest + steps: + - uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + days-before-stale: 240 + days-before-close: 30 + close-issue-message: ${{ env.CLOSE_MESSAGE }} + stale-issue-message: ${{ env.WARN_MESSAGE }} + close-pr-message: ${{ env.CLOSE_MESSAGE }} + stale-pr-message: ${{ env.WARN_MESSAGE }} + exempt-issue-labels: never-stale + exempt-pr-labels: never-stale + stale-issue-label: stale + stale-pr-label: stale + operations-per-run: 500 + remove-stale-when-updated: true