Skip to content

Commit

Permalink
Add a guard to the downstream issue for unexpected github_project_fie…
Browse files Browse the repository at this point in the history
…ld values
  • Loading branch information
webbnh committed Dec 4, 2024
1 parent bbbcea2 commit b4af743
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sync2jira/downstream_issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -975,6 +975,10 @@ def _update_github_project_fields(client, existing, issue,

default_jira_fields = config['sync2jira'].get('default_jira_fields', {})
for name, values in github_project_fields.items():
if name not in dir(issue):
log.error(f"Configuration error: github_project_field key, {name:r}, is not in issue object.")
continue

log.info(f"Looking at GHP field '{name}' with configuration '{values}'")
fieldvalue = getattr(issue, name)
log.info(f"Issue value for field '{name}' is '{fieldvalue}'")
Expand Down

0 comments on commit b4af743

Please sign in to comment.