You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# What this PR does
## Which issue(s) this PR closes
Related to [issue link here]
<!--
*Note*: If you want the issue to be auto-closed once the PR is merged,
change "Related to" to "Closes" in the line above.
If you have more than one GitHub issue that this PR closes, be sure to
preface
each issue link with a [closing
keyword](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests#linking-a-pull-request-to-an-issue).
This ensures that the issue(s) are auto-closed once the PR has been
merged.
-->
## Checklist
- [ ] Unit, integration, and e2e (if applicable) tests updated
- [ ] Documentation added (or `pr:no public docs` PR label added if not
required)
- [ ] Added the relevant release notes label (see labels prefixed w/
`release:`). These labels dictate how your PR will
show up in the autogenerated release notes.
---------
Co-authored-by: Matias Bordese <[email protected]>
Co-authored-by: GitHub Actions <[email protected]>
Co-authored-by: grafana-irm-app[bot] <165293418+grafana-irm-app[bot]@users.noreply.github.com>
Co-authored-by: Michael Derynck <[email protected]>
result+=" (existing notification rules will be deleted)"
92
+
ifuser["oncall_user"]:
93
+
if (
94
+
user["oncall_user"]["notification_rules"]
95
+
andPRESERVE_EXISTING_USER_NOTIFICATION_RULES
96
+
):
97
+
# already has user notification rules defined in OnCall.. we won't touch these
98
+
result+=" (existing notification rules will be preserved due to the PRESERVE_EXISTING_USER_NOTIFICATION_RULES being set to True and this user already having notification rules defined in OnCall)"
99
+
elif (
100
+
user["oncall_user"]["notification_rules"]
101
+
andnotPRESERVE_EXISTING_USER_NOTIFICATION_RULES
102
+
):
103
+
# already has user notification rules defined in OnCall.. we will overwrite these
104
+
result+=" (existing notification rules will be overwritten due to the PRESERVE_EXISTING_USER_NOTIFICATION_RULES being set to False)"
105
+
elifuser["notification_rules"]:
106
+
# user has notification rules defined in PagerDuty, but none defined in OnCall, we will migrate these
107
+
result+=" (existing PagerDuty notification rules will be migrated due to this user not having any notification rules defined in OnCall)"
0 commit comments