Skip to content

Commit

Permalink
test setting outside with agent [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 11, 2024
1 parent 654e5b5 commit 5c5c4dd
Showing 1 changed file with 21 additions and 14 deletions.
35 changes: 21 additions & 14 deletions tasks/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,13 @@ def create_rc(ctx, release_branch, patch_version=False, upstream="origin", slack
"""
major_version = get_version_major(release_branch)

print("BEFORE SETTING ORIGIN")
ctx.run("git remote -v")
if github_action:
ctx.run(f"git remote set-url origin https://x-access-token:{os.environ.get('GITHUB_TOKEN')}@github.com/{GITHUB_REPO_NAME}.git")
# upstream = f"https://x-access-token:{os.environ.get('GITHUB_TOKEN')}@github.com/{GITHUB_REPO_NAME}.git"
print("AFTER SETTING ORIGIN")
ctx.run("git remote -v")
with agent_context(ctx, release_branch):
github = GithubAPI(repository=GITHUB_REPO_NAME)

Expand Down Expand Up @@ -519,20 +526,20 @@ def create_rc(ctx, release_branch, patch_version=False, upstream="origin", slack
code=1,
)

pr_url = create_release_pr(
f"[release] Update release.json and Go modules for {new_highest_version}",
release_branch,
update_branch,
new_final_version,
)

# Step 4 - If slack workflow webhook is provided, send a slack message
if slack_webhook:
print(color_message("Sending slack notification", "bold"))
payload = {
"pr_url": pr_url,
"version": str(new_highest_version),
}
# pr_url = create_release_pr(
# f"[release] Update release.json and Go modules for {new_highest_version}",
# release_branch,
# update_branch,
# new_final_version,
# )

# # Step 4 - If slack workflow webhook is provided, send a slack message
# if slack_webhook:
# print(color_message("Sending slack notification", "bold"))
# 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}")

Expand Down

0 comments on commit 5c5c4dd

Please sign in to comment.