Skip to content

Commit 683fdbf

Browse files
committed
docs: update pull request guidelines
We're going to start accepting pull requests more readily, but the documentation on this topic required some updates to align with the new policies enforced by recent CI changes. Signed-off-by: Jacob Howard <[email protected]>
1 parent 67a9463 commit 683fdbf

File tree

3 files changed

+81
-50
lines changed

3 files changed

+81
-50
lines changed

.github/pull_request_template.md

+11-16
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,20 @@
11
<!--
22
3-
Please note: Mutagen is currently in a state of high code churn and I simply
4-
don't have the time to review pull requests. GitHub unfortunately doesn't allow
5-
me to disable pull requests, but please be aware that they will probably be left
6-
on the back burner for the foreseeable future. Sorry :-(
3+
Thanks for the pull request! Before submitting, please ensure that your commits
4+
adhere to the guidelines in CONTRIBUTING.md. Pull requests that do not meet
5+
these guidelines cannot be merged.
76
8-
– Jacob
7+
If you're not quite ready for a final review, please feel free to open a draft
8+
pull request.
99
10+
-->
1011

11-
In any case, before taking the time to implement a change or feature, please
12-
discuss the proposed change on the Mutagen Community Slack Workspace:
13-
14-
https://mutagen.io/slack
15-
12+
**What does this pull request do and why is it needed?**
1613

17-
If it *does* make sense to open a pull request, please adhere to the
18-
contributing guidelines:
14+
**Which issue(s) does this pull request address (if any)?**
1915

20-
https://github.com/mutagen-io/mutagen/blob/master/CONTRIBUTING.md
16+
(Optional - feel free to delete this section)
2117

22-
They're not too onerous. Pull requests that don't follow these guidelines will
23-
simply be closed.
18+
**Any other notes for the review process?**
2419

25-
-->
20+
(Optional - feel free to delete this section)

CONTRIBUTING.md

+33-34
Original file line numberDiff line numberDiff line change
@@ -28,32 +28,24 @@ email us at [[email protected]](mailto:[email protected]).
2828

2929
## Pull requests
3030

31-
---
32-
33-
**Please note:** I'm still working on formulating Mutagen's pull request policy.
34-
I'm trying to make it as simple as possible while ensuring code quality and
35-
project longevity. I very much want community contributions, but I haven't had
36-
an extensive amount of time to review pull requests or formulate a review
37-
process. I'm working on changing this, so I ask you to bear with me for just a
38-
little longer. Thank you!
39-
40-
– Jacob
41-
42-
---
43-
4431
Before taking the time to implement a change or feature, please discuss the
4532
proposed change on the
33+
[issue tracker](https://github.com/mutagen-io/mutagen/issues) or
4634
[Mutagen Community Slack Workspace](https://mutagen.io/slack).
4735

4836
If it *does* make sense to open a pull request, please adhere to the following
49-
guidelines. Pull requests that don't follow these guidelines will simply be
50-
closed.
37+
guidelines. Pull requests that don't follow these guidelines will be closed.
5138

5239

53-
### Contributor License Agreement
40+
### Developer Certificate of Origin
5441

55-
Mutagen pull requests will require a Contributor License Agreement, though the
56-
exact form of this agreement is still being decided.
42+
Pull requests to Mutagen must be submitted under the terms of the
43+
[Developer Certificate of Origin (DCO)](DCO). In order to accept a pull request,
44+
we require that you sign-off all commits in the pull request using the `-s` flag
45+
with `git commit` to indicate that you agree to the terms of the DCO. You must
46+
also
47+
[cryptographically sign](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits)
48+
your commits to verify your DCO sign-off.
5749

5850

5951
### Code guidelines
@@ -62,33 +54,40 @@ In order to ensure that Mutagen's codebase remains clean and understandable to
6254
all developers, we kindly request that:
6355

6456
- Code adheres to Go style guidelines, including those in
65-
[Effective Go](https://golang.org/doc/effective_go.html) and the
57+
[Effective Go](https://go.dev/doc/effective_go) and the
6658
[Go Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments)
6759
- All code be `go fmt`'d
68-
- Comments be wrapped at 80 columns (with exceptions for long strings like URLs)
69-
- Comments be used to break up code (see existing code for examples) and be
70-
composed of full and complete sentences
71-
- New code include full test coverage
72-
73-
Basically, when in doubt, new code should share the same style as the
74-
surrounding code.
60+
- New code matches the style and structure of its surrouding code (unless a full
61+
refactor/rewrite of a package is being performed)
62+
- Comments be wrapped at 80 columns (with exceptions for long strings like URLs
63+
that can't be wrapped)
64+
- Code does not need to be wrapped at 80 lines, but please do try to keep
65+
lines to a reasonable length
66+
- Comments be used to break up code blocks and be composed of full and complete
67+
sentences
68+
([example](https://github.com/mutagen-io/mutagen/blob/67a94630f3f6ccf7fe7246b30ad75e68326ca2d1/pkg/synchronization/core/scan.go#L142-L240))
69+
- Imports be grouped by module, with standard library packages in the first
70+
group ([example](https://github.com/mutagen-io/mutagen/blob/master/cmd/mutagen/forward/create.go#L3-L25))
71+
- Non-trivial changes include full test coverage
7572

7673

7774
### Commit guidelines
7875

7976
To help keep source control logs readable and useful, we also ask that all
80-
commits have well-formatted commit messages composed of a single subject line of
81-
50-70 characters, followed by a blank line, and finally the full, correctly
82-
punctuated commit message (also wrapped to 80 lines). We ask the same for the
83-
pull request message itself.
77+
commits have well-formatted commit messages that follow the
78+
[Go commit message guidelines](https://go.dev/doc/contribute#commit_messages).
79+
The component in the first line must be one of those listed in
80+
`scripts/ci/commitlint/config.json` and lines must not exceed 72 characters in
81+
length.
8482

8583
Here's an example of a good message:
8684

87-
Modified synchronization controller state locking
85+
sync: modified controller state locking
8886

89-
This commit modifies the synchronization controller's state locking to take
90-
into account changes that can occur during shutdown. It requires that the
91-
synchronization Goroutine hold the state lock until fully terminated.
87+
This commit modifies the synchronization controller's state locking to
88+
take into account changes that can occur during shutdown. It requires
89+
that the synchronization Goroutine hold the state lock until fully
90+
terminated.
9291

9392
Fixes #00000
9493

DCO

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
Developer Certificate of Origin
2+
Version 1.1
3+
4+
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
5+
1 Letterman Drive
6+
Suite D4700
7+
San Francisco, CA, 94129
8+
9+
Everyone is permitted to copy and distribute verbatim copies of this
10+
license document, but changing it is not allowed.
11+
12+
13+
Developer's Certificate of Origin 1.1
14+
15+
By making a contribution to this project, I certify that:
16+
17+
(a) The contribution was created in whole or in part by me and I
18+
have the right to submit it under the open source license
19+
indicated in the file; or
20+
21+
(b) The contribution is based upon previous work that, to the best
22+
of my knowledge, is covered under an appropriate open source
23+
license and I have the right under that license to submit that
24+
work with modifications, whether created in whole or in part
25+
by me, under the same open source license (unless I am
26+
permitted to submit under a different license), as indicated
27+
in the file; or
28+
29+
(c) The contribution was provided directly to me by some other
30+
person who certified (a), (b) or (c) and I have not modified
31+
it.
32+
33+
(d) I understand and agree that this project and the contribution
34+
are public and that a record of the contribution (including all
35+
personal information I submit with it, including my sign-off) is
36+
maintained indefinitely and may be redistributed consistent with
37+
this project or the open source license(s) involved.

0 commit comments

Comments
 (0)