vcs-sync needs to disable or auto close pull requests on github read only mirrors

RESOLVED FIXED

Status

Developer Services
General
RESOLVED FIXED
2 years ago
a year ago

People

(Reporter: hwine, Assigned: hwine)

Tracking

Details

(Assignee)

Description

2 years ago
Unfortunately, github has no option to disable pull requests. Thus, folks can create them, leading to a bad situation:
 a) no one monitors those, so a chance to engage a new contributor is lost
or
 b) additional folks need to be granted admin privileges, which opens a door for accidental synchronization issues we'd rather avoid.

Bug 1205299 arose from discovering there were folks doing (b) :)
(Assignee)

Comment 1

2 years ago
The "best" solution would be to convince github to offer the ability to disable pull requests for specific repositories.

Absent that, there appears to be prior art for "auto close":
  https://github.com/ImJasonH/nopullrequests

Comment 2

2 years ago
Thank you for filing this :-)

GitHub support has been very helpful in the past when I've contacted them, so worth a try at least :-)
https://github.com/contact
(Assignee)

Comment 3

2 years ago
Per github, there is currently only API support for closing a pull request (or issue), not for locking it. (And no support for disabling PR for a repo either.)
(Assignee)

Comment 4

2 years ago
https://github.com/mozilla/github-org-scripts/pull/10 has a solution that worked on the following open PRs:
  https://github.com/mozilla/gecko-dev/pull/70
  https://github.com/mozilla/gecko-dev/pull/68
  https://github.com/mozilla/gecko-dev/pull/66
  https://github.com/mozilla/gecko-projects/pull/1
Assignee: nobody → hwine
Status: NEW → ASSIGNED
(Assignee)

Comment 5

2 years ago
The default message is:
 Pull requests not accepted. Please see CONTRIBUTING.

Which "should" work for most OSS repos. The message can be over-ridden on a per-repository basis.
(Assignee)

Comment 6

a year ago
This is now implemented in
  https://github.com/mozilla/github-org-scripts/blob/master/close_pull_requests.py
Status: ASSIGNED → RESOLVED
Last Resolved: a year ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.