Skip to content

Commit

Permalink
Reformating default message
Browse files Browse the repository at this point in the history
  • Loading branch information
gvegayon committed Oct 4, 2024
1 parent 26f77e2 commit b9cbbc3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions post-artifact/scripts/compose-msg.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
SHA = os.environ.get('SHA')
EXP_DATE = os.environ.get('EXP_DATE')

msg = "[]("+ re.sub(r'\s+', '_', ARTIFACT_NAME)+")"
msg = "<!-- action-comment-id:"+ re.sub(r'\s+', '_', ARTIFACT_NAME)+" -->"
msg = msg + MESSAGE

updated = re.sub(
Expand All @@ -38,7 +38,7 @@

run_url = SERVER_URL + '/' + REPOSITORY + '/actions/runs/' + RUN_ID
updated = updated + \
f'<br><sub>(The artifact expires on {EXP_DATE}. You can re-generate it by re-running the workflow <a href="{run_url}" target="_blank">here</a>)</sub>'
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)
2 changes: 1 addition & 1 deletion post-artifact/scripts/find-comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def main(json_comments) -> str:
return ''

matching_msg = re.escape(
"[](" + re.sub(r'\s+', '_', ARTIFACT_NAME)+")"
"<!-- action-comment-id:" + re.sub(r'\s+', '_', ARTIFACT_NAME)+" -->"
)

# Now you can work with the 'data' object
Expand Down

0 comments on commit b9cbbc3

Please sign in to comment.