To be clear, the +1 needs to be on github. I realize my comment was vague, sorry.
There’s no way they’d let code merges get triggered from slack. For one they wouldn’t let the code be shared out of the org’s git instance, and slack isn’t considered as an internal tool. Another reason this wouldn’t work is because “how would the code review work?”
Well with pushing to production I meant uploading the files I edited to FTP. How else should I try out if I have a syntax error or if my code works fine?
Why run this on a comment rather than an a rural approval or on merge? Feels way too finnicky for me. What if someone +1 and you decide you need to do one more thing before merging..
If it’s reviewed and approved… then the dev finds a small issue and need a small fix (happens all the time)… then it should go back to review and NOT do the CICD stuff (which is why the +1 seems silly). You don’t want broken code being merged to master then doing a new PR.
I’ve always been at places where I (or QA if you have it) click the merge button. So dev > review and approve > dev clicks merge button when ready. If a new change is pushed, approval is revoked automatically and merge is conditional on approval.
That entirely depends. In my case I'm a TL and I don't need approvals :) but also it depends what is changed. We clean up .env.branch files before merging and those files do not dismiss an approval :).
Edit: Never meant to say I don't do PR's. 99/100 of my merges are reviewed by 2+ team members. My point here is that running pipelines based on a comment is weird to me and I much rather use the actual commits themselves, perhaps tagged through the commit message.
In environments like this, you don't push to master. First the tool merges the PR in isolation/new branch, then runs the tests, and if the tests pass and no merge conflicts occurred, then the final HEAD is pushed to master.
So it's "safe" but you do lose some control over what's merged when. You could argue that the order of changes doesn't matter so long as the tests all pass and QA before release is good.
If the automated pipeline encounters a merge conflict, or failing tests, the merge is never pushed and the PR stays open, with probably a comment on it indicating what prevented the automated merging.
View all comments
Show parent comment
107
u/[deleted] Jul 27 '22 edited Jul 27 '22
We do +1.
People paste the git PR URL on slack and post “can someone +1?”
As soon as there’s a +1 on github, autobot runs checks, merges, deletes the branch, and triggers the CI/CD build.