spacedentist / spr

Submit pull requests for individual, amendable, rebaseable commits to GitHub
https://getcord.github.io/spr/
MIT License
377 stars 33 forks source link

Add a reference to how it works for simple PRs #125

Closed joneshf closed 1 year ago

joneshf commented 1 year ago

This can be helpful to understand what's going on under the hood.

I was trying to explain how spr works to a coworker and it got kind of confusing. I went looking for an explanation, but didn't see one. So, I decided to throw this together in case it would be helpful for anyone else.

This is based on my understanding of what happens from both using spr and from reading the code. This might not be the most accurate thing, so any improvements are welcome.

This uses the Gitgraph diagram of Mermaid.js to show what happens with git. This should render on GitHub, since they added support for Mermaid.js not too long ago.

Since the spr website uses mdBook, it should be possible to use the mdbook-mermaid preprocessor to render these diagrams as well. However, I haven't tested this yet personally.

If there's a want for this kind of documentation, explaining how the stacked workflow works will probably be even more useful. It's a bit more complex, so understanding that can be very helpful to know what's happening. I didn't add that right away, since it's a non-trivial amount of work so I wanted to make sure this kind of documentation is even wanted first.

Test Plan: This is documentation, so aside from it making sense and being wanted the test is whether or not it renders properly.

joneshf commented 1 year ago

Bleh. still having troubles with this… Lemme just make a new PR again.