Skip to content

Commit 9d3f03b

Browse files
authored
Update maintainer action (#41839)
1 parent 54c9696 commit 9d3f03b

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

.github/workflows/pull-requests.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ permissions:
1313
jobs:
1414
uneditable:
1515
if: github.repository == 'laravel/framework'
16+
1617
runs-on: ubuntu-latest
18+
1719
steps:
18-
- uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d
20+
- uses: actions/github-script@v6
1921
with:
2022
script: |
2123
const query = `
@@ -49,14 +51,21 @@ jobs:
4951
return;
5052
}
5153
52-
if (!pullRequest.maintainerCanModify) {
54+
if (! pullRequest.maintainerCanModify) {
5355
console.log('PR not owned by Laravel and does not have maintainer edits enabled');
5456
55-
await github.issues.createComment({
57+
await github.rest.issues.createComment({
5658
issue_number: pullNumber,
5759
owner: 'laravel',
5860
repo: 'framework',
59-
body: "Thanks for submitting a PR!\n\nIn order to review and merge PRs most efficiently, we require that all PRs grant maintainer edit access before we review them. For information on how to do this, [see the relevant GitHub documentation](https://docs.github.com/en/github/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork)."
61+
body: "Thanks for submitting a PR!\n\nIn order to review and merge PRs most efficiently, we require that all PRs grant maintainer edit access before we review them. For information on how to do this, [see the relevant GitHub documentation](https://docs.github.com/en/github/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork). Additionally, GitHub doesn't allow maintainer permissions from organization accounts. Please resubmit this PR with maintainer permissions enabled."
62+
});
63+
64+
await github.rest.pulls.update({
65+
pull_number: pullNumber,
66+
owner: 'laravel',
67+
repo: 'framework',
68+
state: 'closed'
6069
});
6170
}
6271
} catch(e) {

0 commit comments

Comments
 (0)