Skip to content

Commit

Permalink
Support new github user attachments urls
Browse files Browse the repository at this point in the history
  • Loading branch information
stevelacey committed Aug 14, 2024
1 parent c4364da commit 1382228
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions slack-message/build_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
).get(os.environ.get("RELEASE_STATUS", "pending"), os.environ.get("RELEASE_ICON", "🚀"))
GITHUB_RUN_URL = f"{GITHUB_REPOSITORY_URL}/actions/runs/{GITHUB_RUN_ID}"
GITHUB_TOKEN = os.environ.get("GITHUB_TOKEN", "")
GITHUB_USER_ATTACHMENTS_URL = "https://github.com/user-attachments"
MESSAGE_TEMPLATE = os.environ.get("MESSAGE_TEMPLATE", "")
PROJECT_NAME = os.environ.get("PROJECT_NAME", "")
PROJECT_TYPE = os.environ.get("PROJECT_TYPE", "website")
Expand Down Expand Up @@ -126,11 +127,10 @@ def get_images(release):
if "badge" in url:
continue

if url.startswith(GITHUB_REPOSITORY_URL):
if url.startswith(GITHUB_USER_ATTACHMENTS_URL):
if not GITHUB_ASSETS_URL:
continue

url = url.replace(GITHUB_REPOSITORY_URL, GITHUB_ASSETS_URL)
url = url.replace(GITHUB_USER_ATTACHMENTS_URL, GITHUB_ASSETS_URL)

images.append(
(f"{pull['title']} #{pull['number']}: {text}".strip(": "), url)
Expand Down

0 comments on commit 1382228

Please sign in to comment.