Skip to content

Reduce reliance on github action specific environment vars#653

Merged
jdalton merged 1 commit intomainfrom
jdalton/reduce-env-use
Jun 12, 2025
Merged

Reduce reliance on github action specific environment vars#653
jdalton merged 1 commit intomainfrom
jdalton/reduce-env-use

Conversation

@jdalton
Copy link
Contributor

@jdalton jdalton commented Jun 12, 2025

No description provided.

@jdalton jdalton merged commit bcee9b5 into main Jun 12, 2025
4 checks passed
@jdalton jdalton deleted the jdalton/reduce-env-use branch June 12, 2025 15:22
Comment on lines +19 to +21
if (!GITHUB_REPOSITORY) {
debugFn('miss: GITHUB_REPOSITORY env var')
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The debug statement logs when GITHUB_REPOSITORY is missing but the function continues execution with a potentially undefined value. Since the next line uses ownerSlashRepo without checking if it's defined, consider adding a return null after the debug call to fail early and prevent attempting to parse an undefined string.

Suggested change
if (!GITHUB_REPOSITORY) {
debugFn('miss: GITHUB_REPOSITORY env var')
}
if (!GITHUB_REPOSITORY) {
debugFn('miss: GITHUB_REPOSITORY env var')
return null
}

Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant