Skip to content

Commit 60cc297

Browse files
Fix broken GitHub Actions after switch to MAINTAINER_LIST (#23640)
1 parent 3ed2bab commit 60cc297

5 files changed

+19
-6
lines changed

.github/workflows/changelog.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,18 @@ on:
1111
- CHANGELOG.md
1212
pull_request_target:
1313

14+
env:
15+
IN_MAINTAINER_LIST: ${{ contains(secrets.MAINTAINER_LIST, github.actor) }}
16+
1417
jobs:
1518
changes:
16-
if: github.event_name == 'pull_request_target' && !contains( secrets.MAINTAINER_LIST, github.actor)
1719
name: Filter Changes
1820
runs-on: ubuntu-latest
1921
outputs:
2022
changed: ${{ steps.filter.outputs.changed }}
2123
steps:
2224
- uses: dorny/paths-filter@v2
25+
if: github.event_name == 'pull_request_target' && env.IN_MAINTAINER_LIST == 'false'
2326
id: filter
2427
with:
2528
filters: |

.github/workflows/dependencies.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,18 @@ on:
77
- 'release/**'
88
pull_request_target:
99

10+
env:
11+
IN_MAINTAINER_LIST: ${{ contains(secrets.MAINTAINER_LIST, github.actor) }}
12+
1013
jobs:
1114
changes:
12-
if: github.event_name == 'pull_request_target' && !contains( secrets.MAINTAINER_LIST, github.actor)
1315
name: Filter Changes
1416
runs-on: ubuntu-latest
1517
outputs:
1618
changed: ${{ steps.filter.outputs.changed }}
1719
steps:
1820
- uses: dorny/paths-filter@v2
21+
if: github.event_name == 'pull_request_target' && env.IN_MAINTAINER_LIST == 'false'
1922
id: filter
2023
with:
2124
filters: |

.github/workflows/issue-comment-created.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@ on:
44
issue_comment:
55
types: [created]
66

7+
env:
8+
IN_MAINTAINER_LIST: ${{ contains(secrets.MAINTAINER_LIST, github.actor) }}
9+
710
jobs:
811
issue_comment_triage:
9-
if: github.event_name == 'issue_comment' && !contains( secrets.MAINTAINER_LIST, github.actor)
1012
runs-on: ubuntu-latest
1113
steps:
1214
- uses: actions-ecosystem/action-remove-labels@v1
15+
if: github.event_name == 'issue_comment' && env.IN_MAINTAINER_LIST == 'false'
1316
with:
1417
labels: |
1518
stale

.github/workflows/maintainer-edit.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ jobs:
77
PermissionsCheck:
88
env:
99
MAINTAINER_CAN_MODIFY: ${{ github.event.pull_request.maintainer_can_modify }}
10-
ALLOW_LISTED: ${{ contains( secrets.MAINTAINER_LIST, github.actor) }}
10+
IN_MAINTAINER_LIST: ${{ contains( secrets.MAINTAINER_LIST, github.actor) }}
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Comment if maintainers cannot edit
14-
if: ${{ ( env.ALLOW_LISTED == 'false' ) && ( env.MAINTAINER_CAN_MODIFY == 'false' ) }}
14+
if: ${{ ( env.IN_MAINTAINER_LIST == 'false' ) && ( env.MAINTAINER_CAN_MODIFY == 'false' ) }}
1515
uses: peter-evans/create-or-update-comment@v1
1616
with:
1717
issue-number: ${{ github.event.pull_request.number }}

.github/workflows/pull_requests.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ on:
22
- pull_request_target
33

44
name: Pull Request Target (All types)
5+
6+
env:
7+
IN_MAINTAINER_LIST: ${{ contains(secrets.MAINTAINER_LIST, github.actor) }}
8+
59
jobs:
610
Labeler:
711
runs-on: ubuntu-latest
@@ -18,7 +22,7 @@ jobs:
1822
- uses: actions/checkout@v3
1923
- name: Apply needs-triage Label
2024
uses: actions/labeler@v4
21-
if: github.event.action == 'opened' && !contains( secrets.MAINTAINER_LIST, github.actor)
25+
if: github.event.action == 'opened' && env.IN_MAINTAINER_LIST == 'false'
2226
with:
2327
configuration-path: .github/labeler-pr-needs-triage.yml
2428
repo-token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)