-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow amend commits for development doc builds #344
Comments
Agree. It shouldn't be the default, but there should be a flag for it for people who want it. See also #213. Combining it with a custom comment sounds good. Although it should by default probably only amend if the commit in question was made by doctr. It shouldn't be hard to implement. The command to commit is here. So a command line flag should be added in For testing, we should set up a separate testing repo whose |
Sounds good. I'll take a crack at this. There is already a |
Yes that is what I was thinking. Add --force to the git push automatically based on whether it is needed. |
This would be helpful to me as well. Perhaps |
--amend seems like a good flag name. |
Currently, doctr makes a new commit to gh-pages every time something shows up in the master branch. This might be problematic for projects with a lot of activity and image heavy docs, like matplotlib or other sphinx-gallery users. The size of gh-pages might ballon due to the large amount of binary files.
My current setup (using tokens), amends the last commit if the current build is not a release:
This keeps the amount of commits down and the branch size under control.
I tried reproducing this setup with doctr using a custom command that makes the amend commit before doctr does: https://github.com/leouieda/test-doctr/blob/master/deploy-gh-pages.sh This doesn't work because doctr sees that there is nothing to commit and doesn't push. Plus, it's an ugly hack.
What would make all of this work for me would be to introduce a flag to tell doctr to
--amend
the commit and a way of inserting a custom comment in the commit message (#282) (so I can detect if the commit should be amended).I'd be happy to implement this myself if someone can point me to the right place in the code base.
The text was updated successfully, but these errors were encountered: