Skip to content

Conversation

@BenjaminPelletier
Copy link
Member

uss_qualifier has the capability to access private GitHub repos when provided with one or more access tokens to do so via the GITHUB_PRIVATE_REPOS environment variable. However, currently run_locally.sh produces an error when GITHUB_PRIVATE_REPOS is not provided because it is set to an empty value rather than being left unset. This PR addresses that problem in two ways: first, it doesn't set the environment variable in the docker container when it isn't provided/present, and second, empty GITHUB_PRIVATE_REPOS values are ignored.

@BenjaminPelletier BenjaminPelletier marked this pull request as ready for review May 21, 2025 02:29
# Check if this is a request to a private GitHub repo
github_private_repos_key = "GITHUB_PRIVATE_REPOS"
if github_private_repos_key in os.environ:
if github_private_repos_key in os.environ and os.environ.get(
Copy link
Contributor

Choose a reason for hiding this comment

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

os.environ.get is going to be None if the variable is not present, so the in part is redudent no?

Copy link
Member Author

Choose a reason for hiding this comment

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

Agreed, thanks

Copy link
Contributor

@barroco barroco left a comment

Choose a reason for hiding this comment

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

See comment from @the-glu

@BenjaminPelletier BenjaminPelletier merged commit 24ad8cf into interuss:main May 24, 2025
21 checks passed
@BenjaminPelletier BenjaminPelletier deleted the fix-private-repos-locally branch May 24, 2025 18:08
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.

3 participants