Skip to content

Commit

Permalink
Improve error message (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
yixinglu authored Nov 9, 2021
1 parent 946ed93 commit b226d76
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ def find_unmerged_community_commits_in_ent_repo(community_repo, ent_repo):

def pr_ref(repo, pr):
pr_num = pr if isinstance(pr, int) else pr.number
return "{}#{}".format(repo.full_name, pr_num)
if pr_num >= 0:
return "{}#{}".format(repo.full_name, pr_num)
return repo.full_name


def pr_link(repo, pr):
Expand Down Expand Up @@ -260,7 +262,7 @@ def main(community_repo, enterprise_repo):
print(f">>> {pr_ref(ent_repo, res[1])} has been migrated from {pr_ref(comm_repo, ci.pr_num)}")
else:
err_pr_list.append(md)
print(f">>> {pr_ref(comm_repo, ci.pr_num)} could not be merged into {ent_repo.full_name}")
print(f">>> {pr_ref(comm_repo, ci.pr_num)} could not be merged into {pr_ref(ent_repo, res[1])}")
break

succ_prs = '\n\n'.join(succ_pr_list) if succ_pr_list else "None"
Expand Down

0 comments on commit b226d76

Please sign in to comment.