Skip to content

Commit

Permalink
Handle case where milestone is null/None
Browse files Browse the repository at this point in the history
  • Loading branch information
ralphbean committed Apr 11, 2024
1 parent 4b74331 commit fbfe3b1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sync2jira/upstream_issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ def handle_github_message(msg, config, pr_filter=True):
return None
elif key == 'milestone':
# special handling for milestone: use the number
actual = msg['msg']['issue'].get(key, {}).get('number')
milestone = msg['msg']['issue'].get(key) or {}
actual = milestone.get('number')
if expected not in actual:
log.debug("Milestone %s not set on issue: %s", expected, upstream)
return None
Expand Down

0 comments on commit fbfe3b1

Please sign in to comment.