CONTRIBUTING.md 3.36 KB
Newer Older
1
# On Contributing
David Haynes's avatar
David Haynes committed
2

3
## git
4

5 6 7
First take a look at [github flow](https://guides.github.com/introduction/flow/)
as this page gives a good starting point on understanding how to work with `git`
in an open source repo.
David Haynes's avatar
David Haynes committed
8

9 10
**Note:**

11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
You will need to be **a member** before making any contributions. Join the slack #go channel and ask.

### Issues

Issues can be opened on gitlab and must adhere to the provided template:

```
# Summary

Here you should include two to three sentences explaining the thought process
about the current issue. Maybe a picture? Some details that could best help someone,
especially someone new, understand the goal of the issue and how they should best
approach the problem.

## Helpful Links

Here you should include a bullet point list of links to documentation, stack overflow,
whatever, that could help guide someone on what it is they are trying to do.
Essentially, a list of links to point them in the right direction.
```

Issues will be closed if they do not adhere to the standard.

You can claim issues by asking in the #go channel whether you can work on it. The project manager will then assign them to you in gitlab.
35

36
### Branches
David Haynes's avatar
David Haynes committed
37

38 39 40
Each branch off of the development branch serves one and only one purpose: to
add, modify, or remove features/bugs from Go. Our list of tasks can be found on
the issues page.
David Haynes's avatar
David Haynes committed
41

42
If you decide to take on an issue for Go you will need to work in a branch off
43
of the current development branch (ie. `go-three`).
David Haynes's avatar
David Haynes committed
44

45
This can be done with the following chain of `git` commands within `go/`:
David Haynes's avatar
David Haynes committed
46

47 48 49
**Note:**

Replace `##` with the issue number that you are working on, and replace
50
`short-description` with a few words that in brief describe what the branch
51 52
does.

53 54 55 56 57 58 59
```sh
git pull
git checkout go-three
git checkout -B ##-short-description
```

**Example Workflow:**
60

David Haynes's avatar
David Haynes committed
61 62
```sh
git pull
63 64
git checkout go-three
git checkout -B 102-readme-updates
David Haynes's avatar
David Haynes committed
65
```
66 67 68

If you are working on something that does not have an issue please open a new
issue before creating your branch.
David Haynes's avatar
David Haynes committed
69

70 71 72 73 74 75
Once you've written commits in a branch you will need to push your commits to gitlab.

    git push origin ##-branchname

`origin` is gitlab.

David Haynes's avatar
David Haynes committed
76 77
### Commits & Their Messages

78 79
It is important to commit more often than not such that if we run into issues we
can narrow down which commit started to cause issues.
David Haynes's avatar
David Haynes committed
80 81 82 83 84

Commit messages should follow the format:

#### Title -

85
Should fill in the blank (Don't actually write "This commit", just the part that comes after!):
David Haynes's avatar
David Haynes committed
86

87
    This commit ______
David Haynes's avatar
David Haynes committed
88

89 90 91 92 93 94 95
Additionally, if you are closing an issue include:

    (Closes #issue_number_here)

Example commit title:

    Complete the about page + TOS (Closes #36)
96

David Haynes's avatar
David Haynes committed
97
#### Description -
98

David Haynes's avatar
David Haynes committed
99 100 101 102
Bullet points of some highlights from the commit.

They don't have to be super serious (see any of my commits) though just a tad bit of info is nice.

103 104
Example commit description:

105 106
    - Composed a short blurb on how banning works
    - Composed a description of SRCT
107 108

[Example full commit](https://git.gmu.edu/srct/go/commit/db89af2e4ffd06a6044d3301a3f7a45ced74799a)
David Haynes's avatar
David Haynes committed
109

110
### Merging to the current development branch
111

112
Open a [merge request](https://git.gmu.edu/srct/go/merge_requests/new)
113 114 115
to start the process of getting your code into the repo. Your code wil be reviewed
by another member before being merged. Your code must pass our tests and include
in the description:
116

117
    Closes #issue_number_here
David Haynes's avatar
David Haynes committed
118

119
[Example pull request](https://git.gmu.edu/srct/go/merge_requests/25)