Skip to content

Clarify development process, re: branches #35

@patcon

Description

@patcon

Re: https://github.com/CivicTechTO/polis/wiki/Development

I don't believe our branching workflow will allow us to easily work with upstream unless we change something 🙏

Specifically, we need to be clear which branches we create new feature branches from (upstream edge, or our downstream analog that's sync'd exactly to upstream, aka our edge), and which branches we expect to be able to submit PRs into (either edge-civictechto or [upstream] edge is what needs to be safe/easy to do). PRs to our repo's edge (the synchronized branch that mirrors upstream) should never be done, and ideally be impossible.

Hopefully this helps show why.

Currently: (non-ideal)

upstream:
               D---E---F edge (default)

civictechto:

                           G---H 123-feature
                          /
                     A---B---C edge (default)
                    /
               D---E---F remote/upstream/edge (headless)

You can see that making our feature branches from our edge (different history that upstream edge) will mean commits A+B from our repo get sent along and pollute upstream PRs. With this setup, we can't make PRs from a singular feature branch that work with either our own default branch or upstreams -- we'd need to create two feature branches for each feature -- one off of commit "A" and another off of commit "E"

Proposed: (i think improvement?)

upstream:
               D---E---F edge (default)

civictechto:

                      G---H 123-feature
                     /
                    /A---B---C edge-civictechto (default)
                   //
               D---E---F edge (sync'd to upstream, protected as reference, never pushed to)

Now, so long as we're always making PRs off of our repo's edge (which will always be sync'ed to upstream edge, and should be protected to never accept anything else), then we can keep submitting our own PRs from a single feature branch: both (a) 123-feature to edge-civictechto, and (b) 123-feature to upstream repo's edge

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions