codeandcoffeelb / codeandcoffeelb.github.io

The repo for the official website for Code and Coffee in Long Beach, CA. Made with jekyll.
http://www.codeandcoffeelb.org
12 stars 14 forks source link

Update Github contributions instructions #38

Open rogerhoward opened 8 years ago

rogerhoward commented 8 years ago

Our current Github flow doesn't require any particular adherence to naming conventions - it's too loose. Let's agree on some basic standards.

rogerhoward commented 8 years ago

1 - Everything must start with an issue...

Issues should have useful, concise titles and enough of a description to understand the scope of the issue.

rogerhoward commented 8 years ago

2 - branches should link to individual issues, and be named using consistent syntax:

bug/#123-abbreviated-issue-title feature/#123-abbreviated-issue-title enhancement/#123-abbreviated-issue-title

rogerhoward commented 8 years ago

3 - a branch should represent an atomic change

...merging the branch to master should not break anything in master. A branch should be fully testable and functional once finished - I should be able to deploy any given branch and have a functional site.

rogerhoward commented 8 years ago

4 - pull requests may not be merged by the requester. Ever.

Even me...

rogerhoward commented 8 years ago

5 - once a pull request is merged, the branch should be removed.

Just basic cleanup.

rogerhoward commented 8 years ago

6 - PR's should use Github keywords so they automatically link to/close related issues.

For reference: https://help.github.com/articles/closing-issues-via-commit-messages/

karimamer commented 8 years ago

:+1: on this process and will like to add Good commit messages serve at least three important purposes:

Structure your commit message like this:

From: [[http://git-scm.com/book/ch5-2.html]]

Short (50 chars or less) summary of changes

More detailed explanatory text, if necessary. Wrap it to about 72 characters or so. In some contexts, the first line is treated as the subject of an email and the rest of the text as the body. The blank line separating the summary from the body is critical (unless you omit the body entirely); tools like rebase can get confused if you run the two together.

Further paragraphs come after blank lines.

  • Bullet points are okay, too
  • Typically a hyphen or asterisk is used for the bullet, preceded by a single space, with blank lines in between, but conventions vary here

DO

DON'T

Tips

References

The following blog post has a nice discussion of commit messages:

"On commit messages":http://who-t.blogspot.com/2009/12/on-commit-messages.html

torch2424 commented 8 years ago

I agree with everything said above. However, I feel like @rogerhoward 's #2 is a bit strict. I feel like a branch name should be anything that represents an issue or topic you are trying to contribute. Having a forced naming convention makes it feel less open to me. But that's just my opinion

karimamer commented 8 years ago

@torch2424 makes it easier to navigate branches and to maintain all branches. say your adding sign up page that would be feature/#123-add-sighn-up-page so it doesn't really strict you unless i am misunderstanding your comment

torch2424 commented 8 years ago

@karimamer You understand me, and yes I would agree it makes it easier, but I was just explaining why I dont implement it. but if that is what's going on, it's completely fine :)

torch2424 commented 8 years ago

Transferred from #46 : I feel like we should clean up our branches. Currently we have alot of stale branches. I noticed alot are member page branches, and those I feel like should be deleted, if the member would like to update their page, they could easily create a new branch.

this would also prevent user from push old master code on accident.

This rule was also implemented in our new readme in #50

rogerhoward commented 8 years ago

That's one issue I feel quite convinced on, having experienced both. Which of the two points in #2 are you objecting to, and what are the downsides?

a) Linking branches to issues b) Using a naming convention

Linking branches to issues is essential - it enforces the "don't do it if you haven't opened an issue" guideline, which I also feel strongly about - it helps avoid surprise branches ("i just did 2 weeks of work on this and you don't want it! boo!") by inviting discussion first. It helps tracking the scope/purpose of a branch by connecting to an issue.

Using a naming convention - honestly, this seems like a no-brainer to me. Got the issue number? Trivial to find a branch. Using standardized naming? Helps sort branches in obvious order. Avoids troublesome branch names.

I really think that's a low barrier to entry and the benefits are huge.

As always, I'm open to being convinced otherwise...

torch2424 commented 8 years ago

@rogerhoward and @karimamer you have convinced me otherwise, I was earlier reffering to strict naming conventions, but after hearing both of your words I understand and agree :)

torch2424 commented 8 years ago

Also, is there a way to rename a branch? Once they are created they is no going back correct

never mind: https://gist.github.com/lttlrck/9628955

karimamer commented 8 years ago

44 let's add github cheat sheet to code and coffee website

rogerhoward commented 8 years ago

Please note my comment on the other issue, copying here to make it explicit:

One critical note - we cannot just incorporate content others developed without their permission, or at very least by using content that has an explicit license allowing us to do so. If you want to incorporate that Github cheat sheet, please contact the author and ask him how to proceed.

If you just want to link to it, that doesn't require permission.