executablebooks / sphinx-panels

A sphinx extension for creating panels in a grid layout
https://sphinx-panels.readthedocs.io
MIT License
83 stars 20 forks source link

Document or automate how to rebase changes onto theme branches #46

Open choldgraf opened 3 years ago

choldgraf commented 3 years ago

I just tried running

https://github.com/executablebooks/sphinx-panels/blob/master/git_rebase_theme_branches.sh

and ran into merge conflicts:

Using index info to reconstruct a base tree...
M       docs/conf.py
M       setup.py
Falling back to patching base and 3-way merge...
Auto-merging setup.py
CONFLICT (content): Merge conflict in setup.py
Auto-merging docs/conf.py
CONFLICT (content): Merge conflict in docs/conf.py
error: Failed to merge in the changes.
Patch failed at 0001 Change to alabaster theme

I'm not sure why - maybe I need to update some branches locally first or something?

Also worth noting I'm working form my fork (which is origin on my machine) while the script seems to hard-code origin expecting it to be this repository.

chrisjsewell commented 3 years ago

ah yeh I guess you need to working from the origin, not a fork (i.e. you are directly updating branches on the repo)

I just run it and it worked fine. You'll see now that all the theme branches are one commit ahead of master: https://github.com/executablebooks/sphinx-panels/tree/alabaster-theme

(linking my original explanation: https://github.com/executablebooks/sphinx-panels/pull/44#issuecomment-707250460)

choldgraf commented 3 years ago

is this something we could automate with a on push to master github action?

chrisjsewell commented 3 years ago

possibly 🤷 but I'm not sure how the permissions would work

choldgraf commented 3 years ago

I think that if we only need to push to our own repository, then github actions already has permissions to take push actions against that same repo via the secrets.GITHUB_TOKEN variable

chrisjsewell commented 3 years ago

Give it a go if you want. It should work, but I just don't want to go down a rabbit hole with it right now lol

choldgraf commented 3 years ago

For sure - I don't think this is really crucial to tackle now, just wanted to note that piece of info for if we wanna tackle this in the future