Skip to content

Commit ebd40d7

Browse files
authored
Don't pass maintainer_can_modify when patching the PR. (#163)
We used to need to pass the `maintainer_can_modify` flag, but now we're getting error message `422 Validation Failed for 'maintainer_can_modify'` when patching the PR. (to append the bpo link) Removing the `maintainer_can_modify` flag fixes the problem, I tested in command line. Hopefully this quick fix can unblock people. Perhaps something changed from GitHub side, but I'm not seeing anything obvious in [their changelog](https://github.blog/changelog/). Closes #162 Closes python/core-workflow#321
1 parent 075eb14 commit ebd40d7

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

bedevere/bpo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ async def set_status(event, gh, *args, **kwargs):
4747
if not body or CLOSING_TAG not in body:
4848
issue_number = issue_number_found.group("issue")
4949
new_body = BODY.format(body=body, issue_number=issue_number)
50-
body_data = {"body": new_body, "maintainer_can_modify": True}
50+
body_data = {"body": new_body}
5151
await gh.patch(event.data["pull_request"]["url"], data=body_data)
5252
status = create_success_status(issue_number_found)
5353
await util.post_status(gh, event, status)
@@ -98,7 +98,7 @@ async def hyperlink_bpo_text(event, gh, *args, **kwargs):
9898
body = event.data[event_name]["body"] or ""
9999
new_body = create_hyperlink_in_comment_body(body)
100100
if new_body != body:
101-
body_data = {"body": new_body, "maintainer_can_modify": True}
101+
body_data = {"body": new_body}
102102
await gh.patch(event.data[event_name][body_location], data=body_data)
103103

104104

bedevere/close_pr.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ async def close_invalid_pr(event, gh, *args, **kwargs):
2929

3030
if PYTHON_MAINT_BRANCH_RE.match(head_label) and \
3131
base_label == "python:master":
32-
data = {'state': 'closed',
33-
'maintainer_can_modify': True}
32+
data = {'state': 'closed'}
3433
await gh.patch(event.data["pull_request"]["url"], data=data)
3534
await gh.post(
3635
f'{event.data["pull_request"]["issue_url"]}/labels',

runtime.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
python-3.7.2
1+
python-3.7.3

0 commit comments

Comments
 (0)