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,7 +28,6 @@ class Backport:
|
|||||||
def getBranchesWithRelease(self):
|
def getBranchesWithRelease(self):
|
||||||
branches = set()
|
branches = set()
|
||||||
for pull_request in self._gh.find_pull_requests("release"):
|
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
|
return branches
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ class Query:
|
|||||||
url
|
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._PULL_REQUEST = Query._PULL_REQUEST.format(min_page_size=min_page_size)
|
||||||
|
|
||||||
self._token = token
|
self._token = token
|
||||||
@ -165,7 +165,7 @@ class Query:
|
|||||||
'''
|
'''
|
||||||
_QUERY = '''
|
_QUERY = '''
|
||||||
repository(owner: "{owner}" name: "{name}") {{
|
repository(owner: "{owner}" name: "{name}") {{
|
||||||
pullRequests(first: {min_page_size} labels: "{label_name}") {{
|
pullRequests(first: {min_page_size} labels: "{label_name}" states: OPEN) {{
|
||||||
nodes {{
|
nodes {{
|
||||||
{pull_request_data}
|
{pull_request_data}
|
||||||
}}
|
}}
|
||||||
|
Loading…
Reference in New Issue
Block a user