API: don't allow merged PRs to be reopened #17192

Merged
noerw merged 6 commits from fix-17180 into main 2021-10-03 03:11:18 +00:00
noerw commented 2021-09-30 13:21:19 +00:00 (Migrated from github.com)

fix #17180

I tried to add tests, but didn't find a way to merge a pull request without introducing a race condition in testing (pr.CanAutoMerge() blocks merging right away). If you have any hints, I'll add tests

fix #17180 I tried to add tests, but didn't find a way to merge a pull request without introducing a race condition in testing (`pr.CanAutoMerge()` blocks merging right away). If you have any hints, I'll add tests
6543 (Migrated from github.com) reviewed 2021-09-30 16:30:50 +00:00
6543 (Migrated from github.com) commented 2021-09-30 16:30:50 +00:00

hmm this way you can "close" a mreged pull ... shoulw we simple check if HasMerged and deny any state change?

hmm this way you can "close" a mreged pull ... shoulw we simple check if HasMerged and deny any state change?
noerw (Migrated from github.com) reviewed 2021-09-30 16:32:33 +00:00
noerw (Migrated from github.com) commented 2021-09-30 16:32:33 +00:00

Not sure if this is a state we can ever get into, but we can make the check more general.
btw, I also just noticed that we need to account for this in EditIssue() as well.. will add that later

Not sure if this is a state we can ever get into, but we can make the check more general. btw, I also just noticed that we need to account for this in `EditIssue()` as well.. will add that later
6543 (Migrated from github.com) approved these changes 2021-10-01 08:46:06 +00:00
jolheiser approved these changes 2021-10-02 15:39:20 +00:00
This repo is archived. You cannot comment on pull requests.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: lunny/gitea#17192
No description provided.