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

Fix orphaned messages in Slack #2023

Merged
merged 41 commits into from
Jun 1, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
f268730
IncidentActionsAccessControlMixin -> AlertGroupActionsAccessControlMixin
vstpme May 25, 2023
623b164
Simplify AlertGroupActionsAccessControlMixin
vstpme May 25, 2023
d44c67e
Move get_alert_group_from_slack_message_payload
vstpme May 25, 2023
153072d
remove classmethod
vstpme May 25, 2023
8f0ad01
AlertGroupActionsAccessControlMixin -> AlertGroupActionsMixin
vstpme May 25, 2023
b03af68
simplify
vstpme May 25, 2023
c522081
simplify
vstpme May 25, 2023
017307c
Merge branch 'dev' into vadimkerr/fix-slack-message-not-in-db
vstpme May 26, 2023
1b56065
Merge branch 'dev' into vadimkerr/fix-slack-message-not-in-db
vstpme May 30, 2023
3746523
Unify alert group action button values, pass alert_group_pk
vstpme May 30, 2023
c8fb699
Cleanup
vstpme May 30, 2023
3ef9f70
fix test
vstpme May 30, 2023
2483157
Tidy ACTION_VERBOSE
vstpme May 30, 2023
1aa8af1
Add tests on get_alert_group
vstpme May 30, 2023
1ef7798
comment
vstpme May 30, 2023
879a99b
more tests
vstpme May 30, 2023
a48585c
more tests
vstpme May 30, 2023
2551655
more tests
vstpme May 31, 2023
1de8d3c
more tests
vstpme May 31, 2023
d29d25d
Fix auth
vstpme May 31, 2023
93c6a39
fix
vstpme May 31, 2023
3c38ef6
Repair orphaned messages
vstpme May 31, 2023
250d112
simplify
vstpme May 31, 2023
815cd36
comment
vstpme May 31, 2023
e4f6108
don't pass additional data to invite user select
vstpme May 31, 2023
9f2a544
simplify
vstpme May 31, 2023
9365498
Add comment
vstpme May 31, 2023
a619614
Fix _get_alert_group_from_message
vstpme May 31, 2023
873d9b5
more tests
vstpme May 31, 2023
784efda
more tests
vstpme May 31, 2023
feba989
comments
vstpme May 31, 2023
be8c659
fix AttachGroupStep
vstpme May 31, 2023
76a3c06
incident -> AlertGroup
vstpme May 31, 2023
0657288
more tests
vstpme May 31, 2023
87d9f0c
Merge branch 'dev' into vadimkerr/fix-slack-message-not-in-db
vstpme May 31, 2023
6ecd44b
Changelog
vstpme May 31, 2023
ce0916b
fix tests
vstpme May 31, 2023
9bf93ed
comments
vstpme Jun 1, 2023
406f709
Merge branch 'dev' into vadimkerr/fix-slack-message-not-in-db
vstpme Jun 1, 2023
4be903c
Check for user=None in is_authorized
vstpme Jun 1, 2023
16a3c9f
Merge branch 'dev' into vadimkerr/fix-slack-message-not-in-db
vstpme Jun 1, 2023
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
Prev Previous commit
Next Next commit
fix
  • Loading branch information
vstpme committed May 31, 2023
commit 93c6a39a29d5d9b87700a32b2f76dcba1a14fa79
2 changes: 1 addition & 1 deletion engine/apps/slack/scenarios/resolution_note.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,8 @@ def process_scenario(self, slack_user_identity, slack_team_identity, payload, da
return

value = data or json.loads(payload["actions"][0]["value"])
action_resolve = value.get("action_resolve", False)
resolution_note_window_action = value.get("resolution_note_window_action", "") or value.get("action_value", "")
action_resolve = value.get("action_resolve", False)

channel_id = payload["channel"]["id"] if "channel" in payload else None

Expand Down
2 changes: 1 addition & 1 deletion engine/apps/slack/scenarios/step_mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class AlertGroupActionsMixin:
"""
Mixin for alert group actions (ack, resolve, etc.). Intended to be used as a mixin along with ScenarioStep.
It serves two purposes:
1. Check that user has required permissions to perform an action. Otherwise, send open a warning window.
1. Check that user has required permissions to perform an action. Otherwise, open a warning window.
2. Provide utility method to get AlertGroup instance from Slack message payload.
"""

Expand Down