You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/contributing/submitting-a-pull-request.md
+14-19Lines changed: 14 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,25 +1,25 @@
1
1
# Submitting a Pull Request
2
2
3
-
Proposed changes to Deis are made as GitHub [pull requests][pr].
3
+
Proposed changes to Deis projects are made as GitHub pull requests.
4
4
5
5
## Design Document
6
6
7
-
Before opening a pull request, ensure your change also references a design document if the contribution is substantial. For more information, see [design documents](design-documents.md).
7
+
Before opening a pull request, ensure your change also references a design document if the contribution is substantial. For more information, see [Design Documents](design-documents.md).
8
8
9
9
## Single Issue
10
10
11
-
When fixing or implementing a GitHub issue, resist the temptation to refactor nearby code or to fix that potential bug you noticed. Instead, open a new [pull request][pr] just for that change.
12
-
13
-
It's hard to reach agreement on the merit of a PR when it isn't focused. Keeping concerns separated allows pull requests to be tested, reviewed, and merged more quickly.
11
+
It's hard to reach agreement on the merit of a PR when it isn't focused. When fixing an issue or implementing a new feature, resist the temptation to refactor nearby code or to fix that potential bug you noticed. Instead, open a separate issue or pull request. Keeping concerns separated allows pull requests to be tested, reviewed, and merged more quickly.
14
12
15
13
Squash and rebase the commit or commits in your pull request into logical units of work with `git`. Include tests and documentation changes in the same commit, so that a revert would remove all traces of the feature or fix.
16
14
17
-
Most pull requests will reference a [GitHub issue][issue]. In the PR description - not in the commit itself - include a line such as "closes #1234". The issue referenced will then be closed when your PR is merged.
15
+
Most pull requests will reference a GitHub issue. In the PR description - not in the commit itself - include a line such as "closes #1234". The issue referenced will automatically be closed when your PR is merged.
18
16
19
17
20
18
## Include Tests
21
19
22
-
If you change or add functionality to any Deis code, your changes should include the necessary tests to prove that it works. Unit tests may be written with the component's implementation language (usually Go or Python), and functional and integration tests are written in Go. Test code can be found in the `tests/` directory of the Deis project.
20
+
If you alter or add functionality to any Deis component, your changes should include the necessary tests to prove that it works. Unit tests may be written with the component's implementation language (usually Go or Python), and functional and integration tests are written in Go.
21
+
22
+
Integration test code spanning multiple Deis components can be found in the `tests/` directory of the [deis/workflow][workflow] project.
23
23
24
24
While working on local code changes, always run the tests. Be sure your proposed changes pass all of `./tests/bin/test-integration` on your workstation before submitting a PR.
25
25
@@ -28,16 +28,14 @@ See [testing](testing.md) for more information.
28
28
29
29
## Include Docs
30
30
31
-
Any change to Deis that could affect a user's experience also needs a change or addition to the relevant documentation. Deis generates the HTML documentation hosted at <http://docs.deis.io/> from the text markup sources in the `docs/` directory.
32
-
33
-
See [the README](https://github.com/deis/deis/blob/master/docs/README.md) for more information.
31
+
Changes to any Deis component that could affect a user's experience also require a change or addition to the relevant documentation. For most Deis components, this involves updating the component's _own_ documentation. In some cases where a component is tightly integrated into [deis/workflow][workflow], its documentation must also be updated.
34
32
35
33
36
34
## Code Standards
37
35
38
-
Deis is a [Go][] and [Python][] project. For both languages, we agree with [The Zen of Python][zen], which emphasizes simple over clever. Readability counts.
36
+
Deis components are implemented in [Go][] and [Python][]. For both languages, we agree with [The Zen of Python][zen], which emphasizes simple over clever. Readability counts.
39
37
40
-
Go code should always be run through `gofmt` on the default settings. Lines of code may be up to 99 characters long. Documentation strings and tests are required for all public methods. Use of third-party go packages should be minimal, but when doing so, vendor code into the Deis package with the [godep][] tool.
38
+
Go code should always be run through `gofmt` on the default settings. Lines of code may be up to 99 characters long. Documentation strings and tests are required for all exported functions. Use of third-party go packages should be minimal, but when doing so, such dependencies should be managed via the [glide][] tool.
41
39
42
40
Python code should always adhere to [PEP8][], the python code style guide, with the exception that lines of code may be up to 99 characters long. Docstrings and tests are required for all public methods, although the [flake8][] tool used by Deis does not enforce this.
43
41
@@ -63,9 +61,6 @@ git commit messages must follow this format:
63
61
umVEX-8 series artifacts will need to be updated to umVX format
64
62
with the consortium or vendor toolset.
65
63
66
-
!!! note
67
-
You can install a git hook that checks your commit message format with `make commit-hook`.
68
-
69
64
### Subject Line
70
65
71
66
The first line of a commit message is its subject. It contains a brief description of the change, no longer than 50 characters.
@@ -80,7 +75,7 @@ These `{types}` are allowed:
80
75
-**test** -> adding missing tests
81
76
-**chore** -> maintenance
82
77
83
-
The `{scope}` specifies the location of the change, such as "controller," "tests", or "contrib". The `{subject}` should use an imperative, present-tense verb: "change," not "changes" or "changed." Don't capitalize the verb or add a period (.) at the end of the subject line.
78
+
The `{scope}` specifies the location of the change, such as "Dockerfile," "tests", or "manifests". The `{subject}` should use an imperative, present-tense verb: "change," not "changes" or "changed." Don't capitalize the verb or add a period (.) at the end of the subject line.
84
79
85
80
### Message Body
86
81
@@ -93,18 +88,18 @@ Separate a footer from the message body with a blank line. Mention any breaking
93
88
94
89
## Merge Approval
95
90
96
-
[Deis maintainers][maintainers] add "**LGTM**" (Looks Good To Me) or an equivalent comment to indicate that a PR is acceptable. Any code change - other than a simple typo fix or one-line documentation change - requires at least two maintainers to accept it.
91
+
Any code change - other than a simple typo fix or one-line documentation change - requires at least two [Deis maintainers][maintainers] to accept it. Maintainers tag pull requests with "**LGTM1**" and "**LGTM2**" (Looks Good To Me) labels to indicate acceptance.
97
92
98
93
No pull requests can be merged until at least one core maintainer signs off with an LGTM. The other LGTM can come from either a core maintainer or contributing maintainer.
99
94
100
95
If the PR is from a Deis maintainer, then he or she should be the one to close it. This keeps the commit stream clean and gives the maintainer the benefit of revisiting the PR before deciding whether or not to merge the changes.
0 commit comments