Skip to content

Commit

Permalink
Merge branch 'master' into bugfix/slack-list-no-incident
Browse files Browse the repository at this point in the history
  • Loading branch information
whitdog47 authored Dec 4, 2024
2 parents ae862a6 + 48bc106 commit 699c92f
Show file tree
Hide file tree
Showing 12 changed files with 255 additions and 211 deletions.
4 changes: 2 additions & 2 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ const config: PlaywrightTestConfig = {
screenshot: "on",
},
/* Maximum time one test can run for. */
timeout: 100 * 1000,
timeout: 200 * 1000,
expect: {
/**
* Maximum time expect() should wait for the condition to be met.
* For example in `await expect(locator).toHaveText();`
*/
timeout: 10000,
timeout: 20000,
},
/* Run tests in files in parallel */
fullyParallel: true,
Expand Down
7 changes: 3 additions & 4 deletions requirements-base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ httplib2==0.22.0
# google-api-python-client
# google-auth-httplib2
# oauth2client
httpx==0.27.2
httpx==0.28.0
# via
# -r requirements-base.in
# openai
Expand Down Expand Up @@ -256,7 +256,7 @@ oauthlib[signedtoken]==3.2.2
# atlassian-python-api
# jira
# requests-oauthlib
openai==1.55.3
openai==1.56.1
# via -r requirements-base.in
packaging==24.2
# via
Expand Down Expand Up @@ -353,7 +353,7 @@ python-dateutil==2.9.0.post0
# pandas
python-jose==3.3.0
# via -r requirements-base.in
python-multipart==0.0.17
python-multipart==0.0.19
# via -r requirements-base.in
python-slugify==8.0.4
# via -r requirements-base.in
Expand Down Expand Up @@ -436,7 +436,6 @@ smart-open==7.0.5
sniffio==1.3.1
# via
# anyio
# httpx
# openai
sortedcontainers==2.4.0
# via hypothesis
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ identify==2.6.1
# via pre-commit
iniconfig==2.0.0
# via pytest
ipython==8.29.0
ipython==8.30.0
# via -r requirements-dev.in
jedi==0.19.1
# via ipython
Expand Down
3 changes: 2 additions & 1 deletion src/dispatch/plugins/dispatch_google/groups/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ def create(
):
"""Creates a new Google Group."""
client = get_service(self.configuration, "admin", "directory_v1", self.scopes)
group_key = f"{name.lower()}@{self.configuration.google_domain}"
# note: group username is limited to 60 characters
group_key = f"{name.lower()[:60]}@{self.configuration.google_domain}"

if not description:
description = "Group automatically created by Dispatch."
Expand Down
53 changes: 37 additions & 16 deletions src/dispatch/plugins/dispatch_slack/case/interactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -2511,28 +2511,49 @@ def ack_mfa_required_submission_event(
) -> None:
"""Handles the add engagement submission event acknowledgement."""

blocks = []

if mfa_enabled:
mfa_text = (
"🔐 To complete this action, you need to verify your identity through Multi-Factor Authentication (MFA).\n\n"
f"Please <{challenge_url}|*click here*> to open the MFA verification page."
blocks.extend(
[
Section(
text="To complete this action, you need to verify your identity through Multi-Factor Authentication (MFA).\n\n"
"Please click the verify button to open the MFA verification page."
),
Actions(
elements=[
Button(
text="🔐 Verify",
action_id="button-link",
style="primary",
url=challenge_url,
)
]
),
]
)
else:
mfa_text = "✅ No additional verification required. You can proceed with the confirmation."
blocks.append(
Section(
text="✅ No additional verification required. You can proceed with the confirmation."
)
)

blocks = [
Section(text=mfa_text),
Divider(),
Context(
elements=[
MarkdownText(
text="💡 This step protects against unauthorized confirmation if your account is compromised."
)
]
),
]
blocks.extend(
[
Divider(),
Context(
elements=[
MarkdownText(
text="💡 This step protects against unauthorized confirmation if your account is compromised."
)
]
),
]
)

modal = Modal(
title="Confirm Your Identity",
title="Verify Your Identity",
close="Cancel",
blocks=blocks,
).build()
Expand Down
Loading

0 comments on commit 699c92f

Please sign in to comment.