Skip to content

Commit 2f72215

Browse files
committed
inform of AMBER secret
1 parent 1202db8 commit 2f72215

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

app.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,7 @@ def github_store_secret(SECRET_NAME, SECRET_VALUE: str):
534534
"avatar_url": avatar_url,
535535
"github_username": username,
536536
"github_repo_origin": origin,
537+
"AMBER_SECRET": AMBER_SECRET,
537538
}
538539
)
539540

signals.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ def signal_subscriber_new_repo(sender):
2828
avatar_url = ""
2929
github_username = ""
3030
github_repo_origin = ""
31+
AMBER_SECRET = ""
3132

3233
if "app_url" in sender:
3334
app_url = sender["app_url"]
@@ -42,12 +43,20 @@ def signal_subscriber_new_repo(sender):
4243
if "github_repo_origin" in sender:
4344
github_repo_origin = sender["github_repo_origin"]
4445
github_repo_url = f"https://github.com/{github_username}/{repo_name}"
46+
if "AMBER_SECRET" in sender:
47+
AMBER_SECRET = sender["AMBER_SECRET"]
48+
SECRETS_URL = (
49+
f"https://github.com/{github_username}/{repo_name}/settings/secrets/actions"
50+
)
4551

4652
subject = f"Your Container Hosting is ready {github_username}!🚀"
4753
body = f"""Welcome {github_username}!\n\n
4854
Your container is hosted at: {app_url}\n\n
4955
Your container hosting repo is setup here: {github_repo_url}\n\n
5056
Your app name and repo name is currently: {repo_name}\n\n\n\n
57+
Your AMBER_SECRET (to store app secrets) is "{AMBER_SECRET}".\n
58+
We recommend you change your AMBER_SECRET as soon as possible and save the\n
59+
new value also at {SECRETS_URL}.\n\n\n\n
5160
Welcome to container hosting!
5261
"""
5362

0 commit comments

Comments
 (0)