dwyl / process-handbook

:green_book: Contains our processes, questions and journey to creating a team
GNU General Public License v2.0
77 stars 10 forks source link

Are there any exceptions around merging straight to master? #74

Closed iteles closed 6 years ago

iteles commented 7 years ago

This question recently came up: Are there any times where I can merge straight to master?

What if I'm the owner of the repo? What if I'm in a rush? What if my QA is unavailable?

Answer: Not that we have ever come across. This is why protecting master branch is now part of our minimum repo requirements? https://github.com/dwyl/contributing#minimum-requirements-for-a-new-repository

We should add this to the repo.

ghost commented 7 years ago

@iteles there is an exception - usually initial commits aren't reviewed?

iteles commented 7 years ago

Well noted @markwilliamfirth 👍

The initial commit is created by github at the same time as the repo with the default name and description given on its inception, so this is only relevant for everything after the initial repo creation.

ghost commented 7 years ago

I think sometimes I've seen yourself or nelson write a readme and submit without review (the initial readme) - is this not proper practice then? If so should we roll out branch protection to all repos as a priority? I would like to note that in my personal opinion I think pushing to master is useful sometimes and can stop issues with minor edits building up in PRs, but obviously happy to do whatever is agreed policy for everyone

SimonLab commented 7 years ago

The first rule of DwYl club is: You do not merge to master. The second rule of DWYl club is: You DO NOT merge to master!

nelsonic commented 7 years ago

Don't confuse creating a repository from scratch where the person is doing all the work up-front on the master branch (pre-workflow) with making an update to an existing repository/project (well-defined workflow)

I didn't make any of these memes ... https://www.google.co.uk/search?tbm=isch&q=git+push+master+meme image image image Pushing to master is generally frowned upon in the community. Orgs/teams that allow git push origin master generally have "workflow & communication issues". Perhaps we need to be more clear in https://github.com/dwyl/contributing ...?

ghost commented 7 years ago

Is there a way to mass protect all the master branches on all +200 repos at the same time without having go to the settings of each individual repo?

iteles commented 7 years ago

Not that I know of.

nelsonic commented 7 years ago

https://developer.github.com/v3/repos/branches/#update-branch-protection

iteles commented 7 years ago

We could write a script to iterate through...

Cleop commented 6 years ago

@iteles - has this now been done based upon the issue reference above being closed?

iteles commented 6 years ago

👍 https://github.com/dwyl/hq/issues/420