Skip to content

Commit

Permalink
codereview: Set a default empty value for github_workflow_url
Browse files Browse the repository at this point in the history
  • Loading branch information
chouetz committed Feb 13, 2025
1 parent ff2ceb4 commit 731a3c0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tasks/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
)
from tasks.libs.common.gomodules import get_default_modules
from tasks.libs.common.user_interactions import yes_no_question
from tasks.libs.common.utils import set_gitconfig_in_ci
from tasks.libs.common.utils import running_in_github_actions, set_gitconfig_in_ci
from tasks.libs.common.worktree import agent_context
from tasks.libs.pipeline.notifications import (
DEFAULT_JIRA_PROJECT,
Expand Down Expand Up @@ -1349,7 +1349,11 @@ def bump_integrations_core(ctx, slack_webhook=None):
"""
Create a PR to bump the integrations core fields in the release.json file
"""
github_workflow_url = f"{os.environ.get('GITHUB_SERVER_URL', 'github.com')}/{GITHUB_REPO_NAME}/actions/runs/{os.environ.get('GITHUB_RUN_ID', '1')}"
github_workflow_url = ""
if running_in_github_actions():
github_workflow_url = (
f"{os.environ.get('GITHUB_SERVER_URL')}/{GITHUB_REPO_NAME}/actions/runs/{os.environ.get('GITHUB_RUN_ID')}"
)
commit_hash = get_git_references(ctx, "integrations-core", "HEAD").split()[0]

rj = load_release_json()
Expand Down

0 comments on commit 731a3c0

Please sign in to comment.