Skip to content

Commit 22eec38

Browse files
committed
maint: inline member roles as env can't be used in job's if
Signed-off-by: Yury V. Zaytsev <[email protected]>
1 parent ca8c90f commit 22eec38

File tree

3 files changed

+4
-13
lines changed

3 files changed

+4
-13
lines changed

.github/workflows/command-approve.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,13 @@ on:
1010
required: true
1111
type: number
1212

13-
env:
14-
AUTHOR_ROLES: ("OWNER" "MEMBER" "COLLABORATOR")
15-
1613
jobs:
1714
approve-issue:
1815
runs-on: ubuntu-latest
1916
timeout-minutes: 5
2017

2118
# https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#issue_comment
22-
if: ${{ !github.event.issue.pull_request && ((github.event.comment.body == '/approve' && contains(env.AUTHOR_ROLES, github.event.comment.author_association)) || inputs.issue_number != '') }}
19+
if: ${{ !github.event.issue.pull_request && ((github.event.comment.body == '/approve' && contains('OWNER MEMBER COLLABORATOR', github.event.comment.author_association)) || inputs.issue_number != '') }}
2320

2421
permissions:
2522
issues: write
@@ -39,7 +36,7 @@ jobs:
3936
timeout-minutes: 5
4037

4138
# https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#issue_comment
42-
if: ${{ github.event.issue.pull_request && ((github.event.comment.body == '/approve' && contains(env.AUTHOR_ROLES, github.event.comment.author_association)) || inputs.issue_number != '') }}
39+
if: ${{ github.event.issue.pull_request && ((github.event.comment.body == '/approve' && contains('OWNER MEMBER COLLABORATOR', github.event.comment.author_association)) || inputs.issue_number != '') }}
4340

4441
permissions:
4542
pull-requests: write

.github/workflows/command-rebase.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,13 @@ on:
1212
required: true
1313
type: number
1414

15-
env:
16-
AUTHOR_ROLES: ("OWNER" "MEMBER" "COLLABORATOR")
17-
1815
jobs:
1916
rebase:
2017
runs-on: ubuntu-latest
2118
timeout-minutes: 5
2219

2320
# https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#issue_comment
24-
if: ${{ (github.event.issue.pull_request && github.event.comment.body == '/rebase' && contains(env.AUTHOR_ROLES, github.event.comment.author_association)) || inputs.issue_number != '' }}
21+
if: ${{ (github.event.issue.pull_request && github.event.comment.body == '/rebase' && contains('OWNER MEMBER COLLABORATOR', github.event.comment.author_association)) || inputs.issue_number != '' }}
2522

2623
permissions:
2724
contents: read

.github/workflows/command-review.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,13 @@ on:
1010
required: true
1111
type: number
1212

13-
env:
14-
AUTHOR_ROLES: ("OWNER" "MEMBER" "COLLABORATOR")
15-
1613
jobs:
1714
review-issue:
1815
runs-on: ubuntu-latest
1916
timeout-minutes: 5
2017

2118
# https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#issue_comment
22-
if: ${{ !github.event.issue.pull_request && ((github.event.comment.body == '/review' && contains(env.AUTHOR_ROLES, github.event.comment.author_association)) || inputs.issue_number != '') }}
19+
if: ${{ !github.event.issue.pull_request && ((github.event.comment.body == '/review' && contains('OWNER MEMBER COLLABORATOR', github.event.comment.author_association)) || inputs.issue_number != '') }}
2320

2421
permissions:
2522
issues: write

0 commit comments

Comments
 (0)