Merge branch 'main' into dev

This commit is contained in:
Ildar Iskhakov 2023-11-28 09:59:07 +08:00 committed by GitHub
commit 393c8e06a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 5 deletions

View file

@ -42,7 +42,7 @@ chain (e.g. acknowledge, resolve, silence etc), the escalation chain will contin
execute.
Users can create escalation chains to configure different type of escalation workflows.
For example, you can create a chain that will notify on-call users with high priopity, and
For example, you can create a chain that will notify on-call users with high priority, and
another chain that will only send a message into a Slack channel.
Escalation chains determine Who and When to notify. [How to notify][notify] is set by the user, based on their own preferences.

View file

@ -126,9 +126,9 @@ the "Firing" state and will re-launch Escalation Chain.
re-launch Escalation Chain and move Alert Group
to the "Firing" state.
* **Resolved:** Similar to "Acknowledged".
*
* Possible transitions:
**Possible transitions**:
* Firing -> Acknowledged
* Firing -> Silenced
* Firing -> Resolved

View file

@ -222,6 +222,20 @@ class SlackEventApiEndpointView(APIView):
response = sc.bots_info(bot=payload_event_bot_id)
bot_user_id = response.get("bot", {}).get("user_id", "")
# test if we can use user from authorizations instead of api call
payload_bot_user_id = payload_event.get("authorizations", {}).get("user_id")
logger.info(
f"checkin_bot_user_id equal={payload_bot_user_id==slack_team_identity.bot_user_id}"
f" payload_bot_user_id={payload_bot_user_id} reqiest_bot_user_id={bot_user_id}"
f" sti_bot_user_id={slack_team_identity.bot_user_id}"
)
# test if we can use bot_id instead of api call
logger.info(
f"checking_bot_id equal={payload_event_bot_id == slack_team_identity.bot_id}"
f" payload_bot_id={payload_event_bot_id} sti_bot_id={slack_team_identity.bot_id}"
)
# Don't react on own bot's messages.
if bot_user_id == slack_team_identity.bot_user_id:
return Response(status=200)

View file

@ -2,8 +2,8 @@ apiVersion: v2
name: oncall
description: Developer-friendly incident response with brilliant Slack integration
type: application
version: 1.3.55
appVersion: v1.3.55
version: 1.3.62
appVersion: v1.3.62
dependencies:
- name: cert-manager
version: v1.8.0