Fix for issue #35#46
Merged
zachary62 merged 3 commits intoThe-Pocket:mainThe-Pocket/PocketFlow-Tutorial-Codebase-Knowledge:mainfrom Apr 24, 2025
siaeyy:fix/issue-35siaeyy/Tutorial-Codebase-Knowledge:fix/issue-35Copy head branch name to clipboard
Merged
Fix for issue #35#46zachary62 merged 3 commits intoThe-Pocket:mainThe-Pocket/PocketFlow-Tutorial-Codebase-Knowledge:mainfrom siaeyy:fix/issue-35siaeyy/Tutorial-Codebase-Knowledge:fix/issue-35Copy head branch name to clipboard
zachary62 merged 3 commits intoThe-Pocket:mainThe-Pocket/PocketFlow-Tutorial-Codebase-Knowledge:mainfrom
siaeyy:fix/issue-35siaeyy/Tutorial-Codebase-Knowledge:fix/issue-35Copy head branch name to clipboard
Conversation
To fix this problem, my solution was getting branch names from Github api and checking for matching. If there is no match, this time check is a tree like this exists.
Previously the default branch name was considered to be "main", which was wrong. To fix this, dont put the ref param to query and let Github decide default branch.
zachary62
reviewed
Apr 23, 2025
utils/crawl_github_files.py
Outdated
| print(f"Error 404: Repository not found or is private.\n" | ||
| f"If this is a private repository, please provide a valid GitHub token via the 'token' argument or set the GITHUB_TOKEN environment variable.") | ||
| else: | ||
| print(f"Error 404: Path '{path}' not found in repository or insufficient permissions with the provided token.\n" |
Member
There was a problem hiding this comment.
The variable path doesn't seem to be defined within the scope of the fetch_branches function.
Should it be {owner}/{repo}?
Member
|
Thank you very much! Left a quick question. |
The formatted error messages that use undefined variables are fixed and their contents are changed.
Contributor
Author
Fixed 👍 |
Member
|
Thank you! |
Contributor
Author
|
Glad to help 🙃 |
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.
The problem with branch names that includes "/" is fixed and the way deciding default branch is refactored.
@zachary62