Skip to content

Commit fe3dd0e

Browse files
committed
s/master/main/
1 parent 3cd8757 commit fe3dd0e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

analytics/github_analyze.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def merge_base(self, ref1, ref2) -> str:
192192
return self._run_git_cmd("merge-base", ref1, ref2).strip()
193193

194194
def rev_list(self, ref):
195-
return self._run_git_cmd("rev-list", f"{self.remote}/master..{ref}").strip().split()
195+
return self._run_git_cmd("rev-list", f"{self.remote}/main..{ref}").strip().split()
196196

197197

198198
def build_commit_dict(commits: List[GitCommit]) -> Dict[str, GitCommit]:
@@ -353,16 +353,16 @@ def print_contributor_stats(commits, delta: Optional[timedelta] = None) -> None:
353353
def commits_missing_in_branch(repo: GitRepo, branch: str, orig_branch: str, milestone_idx: int) -> None:
354354
def get_commits_dict(x, y):
355355
return build_commit_dict(repo.get_commit_list(x, y))
356-
master_commits = get_commits_dict(orig_branch, 'master')
356+
main_commits = get_commits_dict(orig_branch, 'main')
357357
release_commits = get_commits_dict(orig_branch, branch)
358-
print(f"len(master_commits)={len(master_commits)}")
358+
print(f"len(main_commits)={len(main_commits)}")
359359
print(f"len(release_commits)={len(release_commits)}")
360360
print("URL;Title;Status")
361361
for issue in gh_get_milestone_issues('pytorch', 'pytorch', milestone_idx, IssueState.ALL):
362362
html_url, state = issue["html_url"], issue["state"]
363363
# Skip closed states if they were landed before merge date
364364
if state == "closed":
365-
mentioned_after_cut = any(html_url in commit_message for commit_message in master_commits.values())
365+
mentioned_after_cut = any(html_url in commit_message for commit_message in main_commits.values())
366366
# If issue is not mentioned after cut, that it must be present in release branch
367367
if not mentioned_after_cut:
368368
continue
@@ -450,7 +450,7 @@ def main():
450450

451451
print(f"Parsing git history with remote {remote}...", end='', flush=True)
452452
start_time = time.time()
453-
x = repo._run_git_log(f"{remote}/master")
453+
x = repo._run_git_log(f"{remote}/main")
454454
print(f"done in {time.time()-start_time:.1f} sec")
455455
if args.analyze_reverts:
456456
analyze_reverts(x)

0 commit comments

Comments
 (0)