[bitnami/charts] Fix movements for staled issues (#12841)

* [bitnami/charts] Fix wrong column movements when issues or PRs are staled

Signed-off-by: Fran Mulero <fmulero@vmware.com>

* Allow run this workflow manually and force the GITHUB_TOKEN always

Signed-off-by: Fran Mulero <fmulero@vmware.com>

Signed-off-by: Fran Mulero <fmulero@vmware.com>
This commit is contained in:
Fran Mulero
2022-10-10 10:08:30 +02:00
committed by GitHub
parent f4d7dba9cd
commit 84269795e4
3 changed files with 27 additions and 17 deletions
+1 -4
View File
@@ -3,12 +3,9 @@ on:
schedule:
# Hourly
- cron: '0 * * * *'
permissions:
issues: write
pull-requests: write
repository-projects: write
jobs:
stale:
runs-on: ubuntu-latest
@@ -19,4 +16,4 @@ jobs:
stale-issue-label: 'solved'
days-before-stale: 0
days-before-close: 0
repo-token: "${{ secrets.GITHUB_TOKEN }}"
repo-token: ${{ secrets.BITNAMI_BOT_TOKEN }}
+6 -8
View File
@@ -12,17 +12,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Repo checkout
uses: actions/checkout@v2
with:
fetch-depth: 1
uses: actions/checkout@v3
- name: Load .env file
uses: xom9ikk/dotenv@v1.0.2
with:
path: .github/workflows/
- name: Move into From Build Maintenance
uses: peter-evans/create-or-update-project-card@v2
# The comment was created by bitnami-bot in a pull_request
if: ${{ github.actor == 'bitnami-bot' && github.event.issue.pull_request != null }}
# The comment was created by bitnami-bot in a pull_request created by bitnami-bot
if: ${{ github.actor == 'bitnami-bot' && github.event.issue.user.login == 'bitnami-bot' && github.event.issue.pull_request != null }}
with:
project-name: Support
column-name: Build Maintenance
@@ -31,7 +29,7 @@ jobs:
- name: Move into Pending
uses: peter-evans/create-or-update-project-card@v2
if: |
(github.actor != 'bitnami-bot' || github.event.issue.pull_request == null) &&
(github.actor != 'bitnami-bot' || github.event.issue.user.login != 'bitnami-bot' || github.event.issue.pull_request == null) &&
(!contains(github.event.issue.labels.*.name, 'bitnami')) && contains(fromJson(env.BITNAMI_TEAM), github.actor)
with:
project-name: Support
@@ -39,7 +37,7 @@ jobs:
- name: Move into In Progress
uses: peter-evans/create-or-update-project-card@v2
if: |
(github.actor != 'bitnami-bot' || github.event.issue.pull_request == null) &&
(github.actor != 'bitnami-bot' || github.event.issue.user.login != 'bitnami-bot' || github.event.issue.pull_request == null) &&
contains(github.event.issue.labels.*.name, 'in-progress') && (!contains(fromJson(env.BITNAMI_TEAM), github.actor))
with:
project-name: Support
@@ -47,7 +45,7 @@ jobs:
- name: Move into Triage
uses: peter-evans/create-or-update-project-card@v2
if: |
(github.actor != 'bitnami-bot' || github.event.issue.pull_request == null) &&
(github.actor != 'bitnami-bot' || github.event.issue.user.login != 'bitnami-bot' || github.event.issue.pull_request == null) &&
((contains(github.event.issue.labels.*.name, 'triage')) || (contains(github.event.issue.labels.*.name, 'solved'))) && (!contains(fromJson(env.BITNAMI_TEAM), github.actor))
with:
project-name: Support
+20 -5
View File
@@ -1,23 +1,38 @@
name: '[Support] Close stale issues and PRs'
on:
workflow_dispatch:
schedule:
- cron: '0 1 * * *'
permissions:
issues: write
pull-requests: write
# This job won't trigger any additional event. All actions are performed with GITHUB_TOKEN
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
# This step will add the stale comment and label for the first 15 days without activity. It won't close any task
- uses: actions/stale@v4
with:
repo-token: ${{ secrets.BITNAMI_BOT_TOKEN }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.'
stale-pr-message: 'This Pull Request has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thank you for your contribution.'
close-issue-message: 'Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.'
close-pr-message: 'Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Pull Request. Do not hesitate to reopen it later if necessary.'
days-before-stale: 15
days-before-close: 5
days-before-close: -1
exempt-issue-labels: 'on-hold'
exempt-pr-labels: 'on-hold'
operations-per-run: 500
# This step will add the 'solved' label and the last comment before closing the issue or PR. Note that it won't close any issue or PR, they will be closed by the clossing-issues workflow
- uses: actions/stale@v4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.'
stale-pr-message: 'Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Pull Request. Do not hesitate to reopen it later if necessary.'
any-of-labels: 'stale'
stale-issue-label: 'solved'
stale-pr-label: 'solved'
days-before-stale: 5
days-before-close: -1
exempt-issue-labels: 'on-hold'
exempt-pr-labels: 'on-hold'
operations-per-run: 200