Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-36243: [Dev] Remove PR workflow label as part of merge #36244

Merged
merged 3 commits into from
Jun 25, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions dev/merge_arrow_pr.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,8 +421,19 @@ def merge_pr(self, number, commit_title, commit_message):
if response.status_code != 200 and 'merged' not in result:
result['merged'] = False
result['message'] += f': {url}'
else:
self.clear_pr_state_labels(number)
raulcd marked this conversation as resolved.
Show resolved Hide resolved
return result

def clear_pr_state_labels(self, number):
url = f'{self.github_api}/issues/{number}/labels'
response = requests.get(url, headers=self.headers)
labels = response.json()
for label in labels:
if label['name'].startswith('awaiting'):
raulcd marked this conversation as resolved.
Show resolved Hide resolved
label_url = f"{url}/{label['name']}"
response = requests.delete(label_url, headers=self.headers)
raulcd marked this conversation as resolved.
Show resolved Hide resolved


class CommandInput(object):
"""
Expand Down