Repository navigation
Shell subprocesses and lazy-load GitHub token - #256
Open
JPires1992 wants to merge 1 commit into
Open
JPires1992 wants to merge 1 commit into
JPires1992 wants to merge 1 commit into
Conversation
Make subprocess calls compatible with Windows shells and defer GitHub token usage until needed. Use shell=True and convert command lists to strings for npm/mvn calls (github_repo.py, extract_deps.py) so npm/mvn.cmd is found on Windows. Replace top-level GITHUB_TOKEN usage with get_github_headers() that validates the env var and lazily initializes headers in get_pr_info.py, get_pr_review.py and main.py to avoid requiring the token at import time. Also update clone_repo in tool_config.py to include the token in the repo URL when available for authenticated cloning.
Member
|
Hi! Thanks for your PR. If the goal is to make the CLI compatible with Windows subshell, could you please also add Also, what is the rationale behing lazy loading of github headers? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make subprocess calls compatible with Windows shells and defer GitHub token usage until needed. Use shell=True and convert command lists to strings for npm/mvn calls (github_repo.py, extract_deps.py) so npm/mvn.cmd is found on Windows. Replace top-level GITHUB_TOKEN usage with get_github_headers() that validates the env var and lazily initializes headers in get_pr_info.py, get_pr_review.py and main.py to avoid requiring the token at import time. Also update clone_repo in tool_config.py to include the token in the repo URL when available for authenticated cloning.