Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added fallback behaviour for pkg category in Teams and Slack webhook delivery (fixes #111) #175

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions JamfUploaderProcessors/JamfUploaderSlacker.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ def main(self):
slack_channel = self.env.get("slack_channel") or ""
slack_icon_emoji = self.env.get("slack_icon_emoji") or ""

if (not category and jamfpackageuploader_summary_result):
category = jamfpackageuploader_summary_result["data"]["category"]

selfservice_policy_name = name
self.output(f"JSS address: {jss_url}")
self.output(f"Title: {selfservice_policy_name}")
Expand Down
3 changes: 3 additions & 0 deletions JamfUploaderProcessors/JamfUploaderTeamsNotifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ def main(self):
"jamfpolicyuploader_summary_result"
)

if (not category and jamfpackageuploader_summary_result):
category = jamfpackageuploader_summary_result["data"]["category"]

teams_webhook_url = self.env.get("teams_webhook_url")
teams_username = self.env.get("teams_username")
teams_icon_url = (
Expand Down