[bitnami/containers] Fix movements for staled issues (#9445)
[bitnami/containers] Fix wrong column movements when issues or PRs are staled Signed-off-by: Fran Mulero <fmulero@vmware.com> Signed-off-by: Fran Mulero <fmulero@vmware.com>
This commit is contained in:
parent
4928cb79f3
commit
3e8811b815
|
|
@ -3,12 +3,9 @@ on:
|
|||
schedule:
|
||||
# Hourly
|
||||
- cron: '0 * * * *'
|
||||
|
||||
permissions:
|
||||
issues: write
|
||||
repository-projects: write
|
||||
pull-requests: 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 }}
|
||||
|
|
@ -7,23 +7,20 @@ permissions:
|
|||
repository-projects: write
|
||||
issues: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
comments_handler:
|
||||
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
|
||||
|
|
@ -32,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
|
||||
|
|
@ -40,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
|
||||
|
|
@ -48,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
|
||||
|
|
|
|||
|
|
@ -1,24 +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.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
|
||||
|
|
|
|||
Loading…
Reference in New Issue