Closed floehopper closed 6 years ago
I agree that a CONTRIBUTING.md
file that outlines the agreed processes would be ideal, @floehopper would you like to suggest some text for this?
It is easy for me to set up new copies of the site that track additional branches if that would help — if anyone needs a whatever.coops.tech site setting to track a branch just let me know.
I'm not really sure what the best process is in this case - I've never worked on a project with two branches setup to auto-deploy before, nor on a Wordpress project. Perhaps someone who has worked like this before can suggest the best way for this to work with git
and GitHub...?
Some questions:
dev
or master
i.e. not via a PR?dev
for more than a few minutes without merging to master
or reverting?dev
before they are merged into master
or can they be merged directly into master
?Maybe I'm worrying unnecessarily about all this, but if the website is going to be a genuinely collaborative open-source project, I think it would be useful to make this stuff clear.
One of the key questions in all the above points is how easy should it be to make a changes versus how much checking do we want to happen before anything gets deployed to production.
To keep things simple, we could say something like the following:
dev
or master
- only via merging PRs.dev
temporarily for testing and then either merged into master
or reverted.dev
using a non-fast-forward merge to mirror what GitHub's big green "Merge" button does when merging the PR branch to master
. Ideally PR branches should be rebased against master
before merging.However, others may see all this a too restrictive.
@floehopper I think that is fine as long as we also offer to setup sites tracking other branches for people for whom that is too complicated and restrictive, for example I could create a harry.dev.coops.tech
copy of the site to track the harry-dev
branch for things he is working on if needs be...
@chriscroome:
Can I ask what git
command(s) the cron job uses to "sync" a branch? Is the cron job code publicly visible somewhere. The reason I ask is because I'd like to understand whether there are implications of re-writing history on the dev
branch.
Also is there any significant difference between the way the app is run in the Docker-generated development environment versus the production environment? i.e. if I see something working in my development environment, is there really any need to deploy to the dev box?
Hi there - apologies if I've been doing it wrong! I don't do grown up development at Outlandish and don't really get the whole git-flow thing - happy to follow guidance though. I assumed the sensible thing was to test stuff locally, deploy to dev in order to check it worked on the server and create a PR to master. Happy to follow your lead/guidelines.
We've got some new ultra-fancy docker-based CI pipeline thing in the works I believe - maybe we can do a demo at Wortley Hall.
I assumed the sensible thing was to test stuff locally, deploy to dev in order to check it worked on the server and create a PR to master.
That works for me, if we replace it with something more complicated we should make sure everybody understands it and it doesn't result in less people being able to work on the code base.
It seems as if everyone else is happy, so I'm going to close this issue.
Now that the
dev
branch is being automatically deployed to the dev version of the website and themaster
branch is being automatically deployed to the production version of the website, it would be good to agree a process for making changes to the code.When I was looking to merge #44 I was a bit surprised to find a bunch of commits in the
dev
branch which hadn't been merged tomaster
and which had not come via a PR. I ended up cherry-picking the one commit from the PR intodev
to check it didn't break anything, before then merging the PR intomaster
, in order to avoid including the "extra" commits indev
. This doesn't seem ideal.I think I would've preferred to have rebased the PR branch against
dev
and then merged the PR branch intodev
, before finally merging the PR branch intomaster
. However, this would've also included the other commits in thedev
branch which I had no knowledge of.Does anyone have a clear idea how people should make changes to the code? Is it OK to make changes directly to the
dev
and/ormaster
branch, or should we always use a pull request? How should changes be moved intodev
and intomaster
? How long can commits sit indev
before they are either merged tomaster
or removed or reverted? If commits are left "sitting" indev
, they can act as a block to others wanting to deploy changes.It would be good to have clarity on this and explain the process in a
CONTRIBUTING.md
file.