forked from bitnami/charts
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (56 loc) · 2.09 KB
/
triage.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# 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
# To fix the concurrency when for example more than one label is added
concurrency:
group: ${{ github.run_id }}
cancel-in-progress: false
jobs:
# For any opened or reopened issue, should be sent into Triage
send_to_board:
if: ${{ github.actor != 'bitnami-bot' }}
runs-on: ubuntu-latest
steps:
- name: Repo checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Load .env file
uses: xom9ikk/[email protected]
with:
path: .github/workflows/
- name: Assign to a person to work on it
uses: pozil/[email protected]
with:
numOfAssignee: 1
removePreviousAssignees: false
# If it's an internal issue, assign directly to the support team. Otherwise, to the triage one.
teams: ${{ (contains(fromJson(env.BITNAMI_TEAM), github.actor)) && env.SUPPORT_TEAM_NAME || env.TRIAGE_TEAM_NAME }}
repo-token: "${{ secrets.BITNAMI_BOT_TOKEN }}"
- name: Send to the board
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.BITNAMI_BOT_TOKEN }}"
issue-number: ${{ github.event_name != 'issues' && github.event.number || github.event.issue.number }}
- name: Triage labeling
# Only if moved into Solved
uses: andymckay/[email protected]
with:
repo-token: "${{ secrets.BITNAMI_BOT_TOKEN }}"
add-labels: ${{ (!contains(fromJson(env.BITNAMI_TEAM), github.actor)) && 'triage' || 'bitnami' }}
# For reopened issues
remove-labels: "solved"