forked from invertase/flutterfire_cli
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (51 loc) · 1.66 KB
/
issue-labels.yaml
File metadata and controls
53 lines (51 loc) · 1.66 KB
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
name: Update labels on issues with OP response
on:
issue_comment:
types: [created]
issues:
types: [opened]
jobs:
label-op-response:
runs-on: ubuntu-latest
steps:
- name: Check if the comment is from the OP
id: check-op
run: |
OP=${{ github.event.issue.user.login }}
COMMENTER=${{ github.event.comment.user.login }}
echo "OP: $OP"
echo "COMMENTER: $COMMENTER"
if [ "$OP" = "$COMMENTER" ]; then
echo "op_comment=true" >> $GITHUB_ENV
echo "Setting op_comment to true"
else
echo "op_comment=false" >> $GITHUB_ENV
echo "Setting op_comment to false"
fi
- name: Debug - Print op_comment value
run: |
echo "op_comment value: ${{ env.op_comment }}"
- name: Add 'Needs Attention' label if OP responded
if: env.op_comment == 'true'
uses: actions-ecosystem/action-add-labels@v1
with:
labels: 'Needs Attention'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Remove 'blocked customer-response' label if OP responded
if: env.op_comment == 'true'
uses: actions-ecosystem/action-remove-labels@v1
with:
labels: 'blocked: customer-response'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
label-new-issue:
if: github.event.action == 'opened'
runs-on: ubuntu-latest
steps:
- name: Add 'Needs Attention' label to new issue
uses: actions-ecosystem/action-add-labels@v1
with:
labels: 'Needs Attention'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}