forked from thunderbird/thunderbird-android
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (36 loc) · 1.25 KB
/
issue-needinfo-remove.yml
File metadata and controls
40 lines (36 loc) · 1.25 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
---
name: Issue - Remove needinfo label
on:
issue_comment:
types:
- created
permissions:
contents: read
issues: write
jobs:
issue-needinfo-remove:
name: Remove 'needinfo' and add 'answered'
runs-on: ubuntu-latest
if: |
contains(github.event.issue.labels.*.name, 'status: needs information') &&
github.event.comment.author_association != 'OWNER' &&
github.event.comment.author_association != 'MEMBER' &&
github.event.comment.author_association != 'COLLABORATOR'
environment: botmobile
permissions:
issues: write
pull-requests: write
steps:
- name: App token generate
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
if: ${{ vars.BOT_CLIENT_ID }}
id: app-token
with:
app-id: ${{ vars.BOT_CLIENT_ID }}
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
- name: Remove needinfo label and add answered label
env:
ISSUE_NUMBER: ${{ github.event.issue.number }}
GH_TOKEN: ${{ steps.app-token.outputs.token || github.token }}
run: |
gh issue edit $ISSUE_NUMBER --repo "$GITHUB_REPOSITORY" --remove-label "status: needs information" --add-label "status: answered"