Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix for issue #35#46

Merged
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
Apr 24, 2025
Merged

Fix for issue #35#46
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

@siaeyy
Copy link
Contributor

@siaeyy siaeyy commented Apr 23, 2025

The problem with branch names that includes "/" is fixed and the way deciding default branch is refactored.
@zachary62

siaeyy added 2 commits April 23, 2025 12:18
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.
@siaeyy siaeyy changed the title Fix for issue #35 Fix for issue (#35) Apr 23, 2025
@siaeyy siaeyy changed the title Fix for issue (#35) Fix for issue #35 Apr 23, 2025
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"
Copy link
Member

Choose a reason for hiding this comment

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

The variable path doesn't seem to be defined within the scope of the fetch_branches function.
Should it be {owner}/{repo}?

@zachary62
Copy link
Member

Thank you very much! Left a quick question.

The formatted error messages that use undefined variables are fixed and their contents are changed.
@siaeyy
Copy link
Contributor Author

siaeyy commented Apr 24, 2025

Thank you very much! Left a quick question.

Fixed 👍

@zachary62
Copy link
Member

Thank you!

@zachary62 zachary62 merged commit 98fc7b4 into The-Pocket:main Apr 24, 2025
@siaeyy
Copy link
Contributor Author

siaeyy commented Apr 25, 2025

Glad to help 🙃

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.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.