From b9cbbc3a6c8c9f41762950f7bce458d64a386bec Mon Sep 17 00:00:00 2001 From: "George G. Vega Yon" Date: Fri, 4 Oct 2024 10:26:26 -0600 Subject: [PATCH] Reformating default message --- post-artifact/scripts/compose-msg.py | 4 ++-- post-artifact/scripts/find-comment.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/post-artifact/scripts/compose-msg.py b/post-artifact/scripts/compose-msg.py index 90d1549..ab9126f 100644 --- a/post-artifact/scripts/compose-msg.py +++ b/post-artifact/scripts/compose-msg.py @@ -13,7 +13,7 @@ SHA = os.environ.get('SHA') EXP_DATE = os.environ.get('EXP_DATE') -msg = "[]("+ re.sub(r'\s+', '_', ARTIFACT_NAME)+")" +msg = "" msg = msg + MESSAGE updated = re.sub( @@ -38,7 +38,7 @@ run_url = SERVER_URL + '/' + REPOSITORY + '/actions/runs/' + RUN_ID updated = updated + \ - f'
(The artifact expires on {EXP_DATE}. You can re-generate it by re-running the workflow here)' + f'\n\n> ![IMPORTANT]\n> The artifact expires on {EXP_DATE}. You can re-generate it by re-running the workflow [here]({run_url}).' with open('msg-' + SHA + '.txt', 'w') as file: file.write(updated) \ No newline at end of file diff --git a/post-artifact/scripts/find-comment.py b/post-artifact/scripts/find-comment.py index 19c83aa..a9e8680 100644 --- a/post-artifact/scripts/find-comment.py +++ b/post-artifact/scripts/find-comment.py @@ -16,7 +16,7 @@ def main(json_comments) -> str: return '' matching_msg = re.escape( - "[](" + re.sub(r'\s+', '_', ARTIFACT_NAME)+")" + "" ) # Now you can work with the 'data' object