From 340705f1ca4536c4a45b1f2e241e5e822998ef63 Mon Sep 17 00:00:00 2001 From: Ivan Lezhankin Date: Wed, 9 Oct 2019 14:35:38 +0300 Subject: [PATCH] Fix backporting script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rename yandex → ClickHouse --- utils/github/__main__.py | 4 ++-- utils/github/query.py | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/utils/github/__main__.py b/utils/github/__main__.py index 59bf9e01450..920f382d613 100644 --- a/utils/github/__main__.py +++ b/utils/github/__main__.py @@ -42,7 +42,7 @@ parser = argparse.ArgumentParser(description='Helper for the ClickHouse Release parser.add_argument('--repo', '-r', type=str, default='', metavar='PATH', help='path to the root of the ClickHouse repository') parser.add_argument('--remote', type=str, default='origin', - help='remote name of the "yandex/ClickHouse" upstream') + help='remote name of the "ClickHouse/ClickHouse" upstream') parser.add_argument('-n', type=int, default=3, dest='number', help='number of last stable branches to consider') parser.add_argument('--token', type=str, required=True, @@ -78,7 +78,7 @@ for i in reversed(range(len(stables))): from_commit = stables[i][1] -members = set(github.get_members("yandex", "clickhouse")) +members = set(github.get_members("ClickHouse", "ClickHouse")) def print_responsible(pull_request): if pull_request["author"]["login"] in members: return colored(pull_request["author"]["login"], 'green') diff --git a/utils/github/query.py b/utils/github/query.py index f2926e67330..f03cce744d3 100644 --- a/utils/github/query.py +++ b/utils/github/query.py @@ -57,7 +57,7 @@ class Query: return logins _LABELS = ''' - repository(owner: "yandex" name: "ClickHouse") {{ + repository(owner: "ClickHouse" name: "ClickHouse") {{ pullRequest(number: {number}) {{ labels(first: {max_page_size} {next}) {{ pageInfo {{ @@ -99,7 +99,7 @@ class Query: return labels _TIMELINE = ''' - repository(owner: "yandex" name: "ClickHouse") {{ + repository(owner: "ClickHouse" name: "ClickHouse") {{ pullRequest(number: {number}) {{ timeline(first: {max_page_size} {next}) {{ pageInfo {{ @@ -164,7 +164,7 @@ class Query: return events _PULL_REQUESTS = ''' - repository(owner: "yandex" name: "ClickHouse") {{ + repository(owner: "ClickHouse" name: "ClickHouse") {{ defaultBranchRef {{ name target {{ @@ -280,7 +280,7 @@ class Query: f'there are {commit["associatedPullRequests"]["totalCount"]} pull-requests merged in commit {commit["oid"]}' for pull_request in commit['associatedPullRequests']['nodes']: - if(pull_request['baseRepository']['nameWithOwner'] == 'yandex/ClickHouse' and + if(pull_request['baseRepository']['nameWithOwner'] == 'ClickHouse/ClickHouse' and pull_request['baseRefName'] == default_branch_name and pull_request['mergeCommit']['oid'] == commit['oid'] and (not login or pull_request['author']['login'] == login)): @@ -289,7 +289,7 @@ class Query: return pull_requests _DEFAULT = ''' - repository(owner: "yandex", name: "ClickHouse") { + repository(owner: "ClickHouse", name: "ClickHouse") { defaultBranchRef { name } @@ -304,7 +304,7 @@ class Query: return self._run(Query._DEFAULT)['repository']['defaultBranchRef']['name'] _GET_LABEL = ''' - repository(owner: "yandex" name: "ClickHouse") {{ + repository(owner: "ClickHouse" name: "ClickHouse") {{ labels(first: {max_page_size} {next} query: "{name}") {{ pageInfo {{ hasNextPage