Skip to content

Commit

Permalink
Two point fixes (#261)
Browse files Browse the repository at this point in the history
* fedmsg.config.load_config is deprecated

* Add a guard to the downstream issue for unexpected github_project_field values
  • Loading branch information
webbnh authored Dec 9, 2024
1 parent 7fa7dd1 commit cbe4e6d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions sync2jira/downstream_issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -978,6 +978,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
2 changes: 1 addition & 1 deletion sync2jira/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
INITIALIZE = os.getenv('INITIALIZE', '0')


def load_config(loader=fedmsg.config.conf.load_config):
def load_config(loader=lambda: fedmsg.config.conf):
"""
Generates and validates the config file \
that will be used by fedmsg and JIRA client.
Expand Down

0 comments on commit cbe4e6d

Please sign in to comment.