Skip to content

Commit

Permalink
tools: fixing script for setec patches (envoyproxy#29104)
Browse files Browse the repository at this point in the history
* tools: fixing script for setec patches

Signed-off-by: Alyssa Wilk <[email protected]>
  • Loading branch information
alyssawilk authored Aug 21, 2023
1 parent 4806568 commit 2e0f5af
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions tools/deprecate_version/deprecate_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,18 @@ def create_issues(access_token, runtime_and_pr):
issues = []
for runtime_guard, pr, commit in runtime_and_pr:
# Who is the author?
login = None
if pr:
# Extract PR title, number, and author.
pr_info = repo.get_pull(pr)
change_title = pr_info.title
number = ('#%d') % pr
login = pr_info.user.login
else:
try:
pr_info = repo.get_pull(pr)
change_title = pr_info.title
login = pr_info.user.login
except github.GithubException:
print("Failed to fetch info for %s, trying backup method", number)

if not login:
# Extract commit message, sha, and author.
# Only keep commit message title (remove description), and truncate to 50 characters.
change_title = commit.message.split('\n')[0][:50]
Expand Down

0 comments on commit 2e0f5af

Please sign in to comment.