Skip to content

Commit

Permalink
Add the version to the slack notification for RC PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorentClarret committed Dec 3, 2024
1 parent 01c8ef8 commit 0c6e860
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tasks/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,9 +449,12 @@ def create_rc(ctx, major_versions="6,7", patch_version=False, upstream="origin",
# Step 4 - If slack workflow webhook is provided, send a slack message
if slack_webhook:
print(color_message("Sending slack notification", "bold"))
ctx.run(
f"curl -X POST -H 'Content-Type: application/json' --data '{{\"pr_url\":\"{pr_url}\"}}' {slack_webhook}"
)
payload = {
"pr_url": pr_url,
"version": str(new_highest_version),
}

ctx.run(f"curl -X POST -H 'Content-Type: application/json' --data '{json.dumps(payload)}' {slack_webhook}")


@task
Expand Down

0 comments on commit 0c6e860

Please sign in to comment.