mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 08:02:02 +00:00
Merge pull request #24501 from abyss7/fix-backport
[backport] Find only opened PRs by label
This commit is contained in:
commit
be67481946
@ -28,8 +28,7 @@ class Backport:
|
||||
def getBranchesWithRelease(self):
|
||||
branches = set()
|
||||
for pull_request in self._gh.find_pull_requests("release"):
|
||||
if not pull_request['merged'] and not pull_request['closed']:
|
||||
branches.add(pull_request['headRefName'])
|
||||
branches.add(pull_request['headRefName'])
|
||||
return branches
|
||||
|
||||
def execute(self, repo, upstream, until_commit, run_cherrypick):
|
||||
|
@ -48,7 +48,7 @@ class Query:
|
||||
url
|
||||
'''
|
||||
|
||||
def __init__(self, token, owner, name, team, max_page_size=100, min_page_size=5):
|
||||
def __init__(self, token, owner, name, team, max_page_size=100, min_page_size=10):
|
||||
self._PULL_REQUEST = Query._PULL_REQUEST.format(min_page_size=min_page_size)
|
||||
|
||||
self._token = token
|
||||
@ -165,7 +165,7 @@ class Query:
|
||||
'''
|
||||
_QUERY = '''
|
||||
repository(owner: "{owner}" name: "{name}") {{
|
||||
pullRequests(first: {min_page_size} labels: "{label_name}") {{
|
||||
pullRequests(first: {min_page_size} labels: "{label_name}" states: OPEN) {{
|
||||
nodes {{
|
||||
{pull_request_data}
|
||||
}}
|
||||
|
Loading…
Reference in New Issue
Block a user