Fix notifiers reading repo/branch from wrong source#30
Open
Fix notifiers reading repo/branch from wrong source#30
Conversation
Webhook, Slack, MS Teams, MS Sentinel, and SumoLogic notifiers read repository and branch from self.config, which never contains these fields. The NotificationManager populates them in the facts dict (manager.py:279-280), matching the pattern the Jira notifier already uses correctly. Changed all five notifiers to read from facts instead of self.config.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
repositoryandbranchfromself.config, which never contains these fields, resulting in"Unknown"for both values in all outbound payloadsNotificationManagercorrectly populates these in thefactsdict (manager.py:279-280), and the Jira notifier already reads fromfactscorrectlyfactsinstead ofself.configTest plan
self.configonly contains init params (e.g.url), neverrepository/branchfactsdict contains correctrepositoryandbranchafterNotificationManager.notify_all()populates them