Skip to content

Commit e48aa8d

Browse files
committed
remove locking pr, add better comment, and change lock reason to resolved
1 parent 6572151 commit e48aa8d

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

.github/workflows/close-org-prs.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,18 @@ jobs:
2727
issue_number: pr.number,
2828
labels: ['invalid']
2929
});
30-
// Close the PR
31-
await github.rest.pulls.update({
32-
owner: context.repo.owner,
33-
repo: context.repo.repo,
34-
pull_number: pr.number,
35-
state: 'closed'
36-
});
3730
// Leave a comment
3831
await github.rest.issues.createComment({
3932
owner: context.repo.owner,
4033
repo: context.repo.repo,
4134
issue_number: pr.number,
42-
body: "We don't allow pull requests from organization accounts. This PR has been closed."
35+
body: "Please don't open PRs from a fork owned by a different organization rather than your account. It causes GitHub to disable the ability for maintainers to push changes, so we can't update this to prepare it for merge."
4336
});
4437
// Lock the conversation
4538
await github.rest.issues.lock({
4639
owner: context.repo.owner,
4740
repo: context.repo.repo,
4841
issue_number: pr.number,
49-
lock_reason: 'spam'
42+
lock_reason: 'resolved'
5043
});
5144
}

0 commit comments

Comments
 (0)