Repository navigation
🐛 (patch) Continue existing API docs branches instead of pulling them - #133
Merged
Merged
Conversation
api_deploy.py made the docs branch from main and then pulled the remote branch into it. Once main has a commit the branch lacks, such as another repository's merged docs, the pull fails on divergent branches. The script reported that as a missing branch, committed on top of main and the push was rejected as non-fast-forward. It now checks out origin/<branch> when it exists and only starts from main for a new branch.
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.
Fixes the 📚 Deploy APIs runs that fail at "Deploy to API repo" with a non-fast-forward push. libhal and libhal-arm-mcu both fail this way on main right now.
Cause
api_deploy.pyclonedlibhal/api, created the docs branch frommain, then rangit pull origin <branch>.mainhas a commit the docs branch lacks, the two have diverged, and the pull fails because no pull strategy is configured.main, and the push was rejected.Change
origin/<branch>exists, the script checks it out and commits on top, so the push is a fast-forward.mainas before.maindoesn't matter for the docs PR, since each repository's docs live in their own directory.Testing
I tested locally against a bare repo set up the way
libhal/apiis now: a docs branch one commit behind amainthat moved on. The GitHub URL and API calls were stubbed out.mainand pushes.