Adding support for GH dashboard (#187)
Signed-off-by: Alejandro Gómez <morona@vmware.com>
This commit is contained in:
parent
41ec5ecbb2
commit
cb2eb144e4
|
|
@ -1,5 +1,6 @@
|
|||
name: 🐞 Bug
|
||||
description: Create a report to help us improve
|
||||
labels: ["tech-issues"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
name: "\U0001F680 Feature request"
|
||||
description: Suggest an idea for this project
|
||||
labels: ["feature-request"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
BITNAMI_TEAM='["bitnami-bot","jotamartos","alemorcuq","agomezmoron","carrodher","corico44","dgomezleon","fmulero","FraPazGal","javsalgar","gongomgra","joancafom","marcosbc","aoterolorenzo","CeliaGMqrz","Mauraza","mdhont","migruiz4","rafariossaa","beltran-rubo","recena"]'
|
||||
SUPPORT_TEAM='["alemorcuq","carrodher","fmulero","FraPazGal","javsalgar","joancafom","migruiz4","rafariossaa"]'
|
||||
TRIAGE_TEAM='["carrodher","fmulero", "javsalgar","rafariossaa"]'
|
||||
IN_PROGRESS_COLUMN_ID=19026822
|
||||
TRIAGE_COLUMN_ID=19026814
|
||||
SOLVED_COLUMN_ID=19026825
|
||||
ON_HOLD_COLUMN_ID=19026824
|
||||
BITNAMI_COLUMN_ID=19026814
|
||||
PENDING_COLUMN_ID=19026823
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
name: '[Support] Close Solved issues'
|
||||
on:
|
||||
schedule:
|
||||
# Hourly
|
||||
- cron: '0 * * * *'
|
||||
|
||||
permissions:
|
||||
issues: write
|
||||
repository-projects: write
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v4
|
||||
with:
|
||||
any-of-labels: 'solved'
|
||||
stale-issue-label: 'solved'
|
||||
days-before-stale: 0
|
||||
days-before-close: 0
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
name: '[Support] Organizing cards based on comments'
|
||||
on:
|
||||
issue_comment:
|
||||
types:
|
||||
- created
|
||||
permissions:
|
||||
repository-projects: write
|
||||
issues: write
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.event_name != 'issues' && github.event.number || github.event.issue.number }}
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
comments_handler:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Repo checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- name: Load .env file
|
||||
uses: xom9ikk/dotenv@v1.0.2
|
||||
with:
|
||||
path: .github/workflows/
|
||||
- name: Move into Pending
|
||||
uses: peter-evans/create-or-update-project-card@v2
|
||||
if: ${{ (!contains(github.event.issue.labels.*.name, 'bitnami')) && contains(fromJson(env.BITNAMI_TEAM), github.event.comment.user.login) }}
|
||||
with:
|
||||
project-name: Support
|
||||
column-name: Pending
|
||||
token: "${{ secrets.GHPROJECT_TOKEN }}"
|
||||
- name: Move into In Progress
|
||||
uses: peter-evans/create-or-update-project-card@v2
|
||||
if: ${{ contains(github.event.issue.labels.*.name, 'in-progress') && (!contains(fromJson(env.BITNAMI_TEAM), github.event.comment.user.login)) }}
|
||||
with:
|
||||
project-name: Support
|
||||
column-name: In progress
|
||||
token: "${{ secrets.GHPROJECT_TOKEN }}"
|
||||
- name: Move into Triage
|
||||
uses: peter-evans/create-or-update-project-card@v2
|
||||
if: ${{ ((contains(github.event.issue.labels.*.name, 'triage')) || (contains(github.event.issue.labels.*.name, 'solved'))) && (!contains(fromJson(env.BITNAMI_TEAM), github.event.comment.user.login)) }}
|
||||
with:
|
||||
project-name: Support
|
||||
column-name: Triage
|
||||
token: "${{ secrets.GHPROJECT_TOKEN }}"
|
||||
- name: Label as triage back
|
||||
# Only if commented when solved
|
||||
if: ${{ contains(github.event.issue.labels.*.name, 'solved') }}
|
||||
uses: andymckay/labeler@1.0.4
|
||||
with:
|
||||
add-labels: "triage"
|
||||
remove-labels: "solved"
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
name: '[Support] Move closed issues'
|
||||
on:
|
||||
issues:
|
||||
types:
|
||||
- closed
|
||||
pull_request_target:
|
||||
types:
|
||||
- closed
|
||||
|
||||
permissions:
|
||||
issues: write
|
||||
repository-projects: write
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.event_name != 'issues' && github.event.number || github.event.issue.number }}
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
send_to_solved:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Repo checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- name: Load .env file
|
||||
uses: xom9ikk/dotenv@v1.0.2
|
||||
with:
|
||||
path: .github/workflows/
|
||||
- name: Preparing string variables
|
||||
run: |
|
||||
TRIAGE_TEAM_STRING=${TRIAGE_TEAM/[/}
|
||||
TRIAGE_TEAM_STRING=${TRIAGE_TEAM_STRING/]/}
|
||||
TRIAGE_TEAM_STRING=${TRIAGE_TEAM_STRING//'"'/}
|
||||
# creating env variable "on the fly"
|
||||
echo "TRIAGE_TEAM_STRING=$TRIAGE_TEAM_STRING" >> $GITHUB_ENV
|
||||
- name: Send to the Solved column
|
||||
uses: peter-evans/create-or-update-project-card@v2
|
||||
with:
|
||||
project-name: Support
|
||||
# If the author comes from Bitnami, send it to Bitnami. Otherwise, all to Triage
|
||||
column-name: 'Solved'
|
||||
token: "${{ secrets.GHPROJECT_TOKEN }}"
|
||||
issue-number: ${{ github.event_name != 'issues' && github.event.number || github.event.issue.number }}
|
||||
- name: Solved labeling
|
||||
# Only if moved into Solved
|
||||
uses: andymckay/labeler@1.0.4
|
||||
with:
|
||||
repo-token: "${{ secrets.GHPROJECT_TOKEN }}"
|
||||
add-labels: "solved"
|
||||
remove-labels: "in-progress, on-hold, triage"
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
# This workflow is built to manage the triage support by using GH issues.
|
||||
name: '[Support] Cards movements'
|
||||
on:
|
||||
project_card:
|
||||
types:
|
||||
- moved
|
||||
|
||||
permissions:
|
||||
repository-projects: read
|
||||
issues: write
|
||||
|
||||
concurrency:
|
||||
# Cards are special
|
||||
group: ${{ github.event.project_card.content_url }}
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
label-card:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Repo checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- name: Load .env file
|
||||
uses: xom9ikk/dotenv@v1.0.2
|
||||
with:
|
||||
path: .github/workflows/
|
||||
# Now handling the needed labeling
|
||||
- name: On hold labeling
|
||||
# Only if moved into on hold
|
||||
if: ${{ github.event.project_card.column_id == env.ON_HOLD_COLUMN_ID }}
|
||||
uses: andymckay/labeler@1.0.4
|
||||
with:
|
||||
repo-token: "${{ secrets.GHPROJECT_TOKEN }}"
|
||||
add-labels: "on-hold"
|
||||
remove-labels: "triage"
|
||||
- name: In progress labeling
|
||||
# Only if moved into In progress
|
||||
if: ${{ github.event.project_card.column_id == env.IN_PROGRESS_COLUMN_ID }}
|
||||
uses: andymckay/labeler@1.0.4
|
||||
with:
|
||||
repo-token: "${{ secrets.GHPROJECT_TOKEN }}"
|
||||
add-labels: "in-progress"
|
||||
remove-labels: "on-hold, triage"
|
||||
- name: Solved labeling
|
||||
# Only if moved into Solved
|
||||
if: ${{ github.event.project_card.column_id == env.SOLVED_COLUMN_ID }}
|
||||
uses: andymckay/labeler@1.0.4
|
||||
with:
|
||||
repo-token: "${{ secrets.GHPROJECT_TOKEN }}"
|
||||
add-labels: "solved"
|
||||
remove-labels: "in-progress, on-hold, triage"
|
||||
assign-assignee-if-needed:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Repo checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- name: Load .env file
|
||||
uses: xom9ikk/dotenv@v1.0.2
|
||||
with:
|
||||
path: .github/workflows/
|
||||
- name: Preparing string variables
|
||||
run: |
|
||||
SUPPORT_TEAM_STRING=${SUPPORT_TEAM/[/}
|
||||
SUPPORT_TEAM_STRING=${SUPPORT_TEAM_STRING/]/}
|
||||
SUPPORT_TEAM_STRING=${SUPPORT_TEAM_STRING//'"'/}
|
||||
# creating env variable "on the fly"
|
||||
echo "SUPPORT_TEAM_STRING=$SUPPORT_TEAM_STRING" >> $GITHUB_ENV
|
||||
- name: Assign to a person to work on it
|
||||
# Only if moved into In progress FROM Triage
|
||||
if: ${{ github.event.project_card.column_id == env.IN_PROGRESS_COLUMN_ID && github.event.changes != null && github.event.changes.column_id && github.event.changes.column_id.from == env.TRIAGE_COLUMN_ID }}
|
||||
uses: pozil/auto-assign-issue@v1.7.3
|
||||
with:
|
||||
numOfAssignee: 1
|
||||
assignees: ${{ env.SUPPORT_TEAM_STRING }}
|
||||
removePreviousAssignees: true
|
||||
# teams: XXX
|
||||
repo-token: "${{ secrets.GHPROJECT_TOKEN }}"
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
# This workflow is built to manage the triage support by using GH issues.
|
||||
name: '[Support] Organize triage'
|
||||
on:
|
||||
issues:
|
||||
types:
|
||||
- reopened
|
||||
- opened
|
||||
pull_request_target:
|
||||
types:
|
||||
- reopened
|
||||
- opened
|
||||
permissions:
|
||||
repository-projects: write
|
||||
issues: write
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.event_name != 'issues' && github.event.number || github.event.issue.number }}
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
# For any opened or reopened issue, should be sent into Triage
|
||||
send_to_board:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Repo checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- name: Load .env file
|
||||
uses: xom9ikk/dotenv@v1.0.2
|
||||
with:
|
||||
path: .github/workflows/
|
||||
- name: Preparing string variables
|
||||
run: |
|
||||
TRIAGE_TEAM_STRING=${TRIAGE_TEAM/[/}
|
||||
TRIAGE_TEAM_STRING=${TRIAGE_TEAM_STRING/]/}
|
||||
TRIAGE_TEAM_STRING=${TRIAGE_TEAM_STRING//'"'/}
|
||||
# creating env variable "on the fly"
|
||||
echo "TRIAGE_TEAM_STRING=$TRIAGE_TEAM_STRING" >> $GITHUB_ENV
|
||||
- name: Assign to a person to work on it
|
||||
uses: pozil/auto-assign-issue@v1.7.3
|
||||
with:
|
||||
numOfAssignee: 1
|
||||
assignees: ${{ env.TRIAGE_TEAM_STRING }}
|
||||
removePreviousAssignees: false
|
||||
# teams: XXX
|
||||
repo-token: "${{ secrets.GHPROJECT_TOKEN }}"
|
||||
- name: Send to the board
|
||||
if: ${{ github.actor != 'bitnami-bot' }}
|
||||
uses: peter-evans/create-or-update-project-card@v2
|
||||
with:
|
||||
project-name: Support
|
||||
# If the author comes from Bitnami, send it to Bitnami. Otherwise, all to Triage
|
||||
column-name: ${{ (contains(fromJson(env.BITNAMI_TEAM), github.actor)) && 'From Bitnami' || 'Triage' }}
|
||||
token: "${{ secrets.GHPROJECT_TOKEN }}"
|
||||
issue-number: ${{ github.event_name != 'issues' && github.event.number || github.event.issue.number }}
|
||||
- name: Triage labeling
|
||||
# Only if moved into Solved
|
||||
uses: andymckay/labeler@1.0.4
|
||||
with:
|
||||
repo-token: "${{ secrets.GHPROJECT_TOKEN }}"
|
||||
add-labels: ${{ (!contains(fromJson(env.BITNAMI_TEAM), github.actor)) && 'triage' || 'bitnami' }}
|
||||
# For reopened issues
|
||||
remove-labels: "solved"
|
||||
Loading…
Reference in New Issue