-
Notifications
You must be signed in to change notification settings - Fork 68
42 lines (37 loc) · 1.89 KB
/
do-prioritize-issues.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
# This workflow runs when labels are applied to issues.
#
# - Get list of labels.
# - Determine issue priority based on labels:
# - C: convention && P: bug --> U: high
# - C: style && P: bug --> U: medium
# - C: stakeholder && P:bug --> U: medium
# - C: convention && P: enhancement --> U: medium
# - C: style && P: enhancement --> U: low
# - C: stakeholder && P: enhancement --> U: low
# - chore || P: docs --> U: low
name: Prioritize Issues Workflow
on:
issues:
types: ['labeled', 'unlabeled']
jobs:
prioritize_issues:
runs-on: ubuntu-latest
steps:
- name: Get Issue Labels
id: getlabels
uses: weibullguy/get-labels-action@main
- name: Add High Urgency Labels
if: "${{ (contains(steps.getlabels.outputs.labels, 'C: convention') && contains (steps.getlabels.outputs.labels, 'P: bug')) }}"
uses: andymckay/labeler@master
with:
add-labels: "U: high"
- name: Add Medium Urgency Labels
if: "${{ (contains(steps.getlabels.outputs.labels, 'C: style') && contains(steps.getlabels.outputs.labels, 'P: bug')) || (contains(steps.getlabels.outputs.labels, 'C: stakeholder') && contains(steps.getlabels.outputs.labels, 'P: bug')) || (contains(steps.getlabels.outputs.labels, 'C: convention') && contains(steps.getlabels.outputs.labels, 'P: enhancement')) }}"
uses: andymckay/labeler@master
with:
add-labels: "U: medium"
- name: Add Low Urgency Labels
if: "${{ (contains(steps.getlabels.outputs.labels, 'C: style') && contains(steps.getlabels.outputs.labels, 'P: enhancement')) || (contains(steps.getlabels.outputs.labels, 'C: stakeholder') && contains(steps.getlabels.outputs.labels, 'P: enhancement')) || contains(steps.getlabels.outputs.labels, 'doc') || contains(steps.getlabels.outputs.labels, 'chore') }}"
uses: andymckay/labeler@master
with:
add-labels: "U: low"