Skip to content

Commit 43d49e3

Browse files
baijumarthurdm
authored andcommitted
Make contributing guidelines more relevant
- Remove Kubernetes SIG specific details - The text is written for all repositories. Signed-off-by: Baiju Muthukadan <[email protected]> Co-authored-by: Arthur De Magalhaes <[email protected]>
1 parent 371cc54 commit 43d49e3

File tree

1 file changed

+142
-21
lines changed

1 file changed

+142
-21
lines changed

CONTRIBUTING.md

+142-21
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,154 @@
11
# Contributing Guidelines
22

3-
## Getting Started
3+
:+1::tada: First off, thanks for taking the time to contribute! :tada::+1:
44

5-
We have full documentation on how to get started contributing here:
5+
The Service Binding project is a community lead effort. A bi-weekly [working group call][working-group] is open to the public. Discussions occur here on GitHub and on the [#bindings-discuss channel in the Kubernetes Slack][slack].
66

7-
<!---
8-
If your repo has certain guidelines for contribution, put them here ahead of the general k8s resources
9-
-->
7+
[working-group]: https://docs.google.com/document/d/1rR0qLpsjU38nRXxeich7F5QUy73RHJ90hnZiFIQ-JJ8/edit#heading=h.ar8ibc31ux6f
8+
[slack]: https://kubernetes.slack.com/archives/C012F2GPMTQ
109

11-
- [Contributor License Agreement](https://git.k8s.io/community/CLA.md) Kubernetes projects require that you sign a Contributor License Agreement (CLA) before we can accept your pull requests
12-
- [Kubernetes Contributor Guide](https://git.k8s.io/community/contributors/guide) - Main contributor documentation, or you can just jump directly to the [contributing section](https://git.k8s.io/community/contributors/guide#contributing)
13-
- [Contributor Cheat Sheet](https://git.k8s.io/community/contributors/guide/contributor-cheatsheet) - Common resources for existing developers
10+
There are multiple Git repositories under the [`servicebinding` GitHub organization](https://github.com/servicebinding).
1411

15-
## Mentorship
12+
- [spec](https://github.com/servicebinding/spec) - The latest actively developing working copy of the spec.
13+
- [service-binding-controller](https://github.com/servicebinding/service-binding-controller) - The reference implementation of the spec.
14+
- [website](https://github.com/servicebinding/website) - The [servicebinding.io](https://servicebinding.io) website content.
15+
- [conformance](https://github.com/servicebinding/conformance) - The conformace test suite.
1616

17-
- [Mentoring Initiatives](https://git.k8s.io/community/mentoring) - We have a diverse set of mentorship programs available that are always looking for volunteers!
1817

19-
## Working Group
18+
If you catch an error, please let us know by opening an issue or pull request in the related GitHub repository.
2019

21-
The Service Binding Specification for Kubernetes project is a community lead effort.
22-
A bi-weekly [working group call][working-group] is open to the public.
23-
Discussions occur here on GitHub and on the [#bindings-discuss channel in the Kubernetes Slack][slack].
20+
Please note we have a [code of conduct][conduct], please follow it in all your interactions with the project.
2421

25-
[working-group]: https://docs.google.com/document/d/1rR0qLpsjU38nRXxeich7F5QUy73RHJ90hnZiFIQ-JJ8/edit#heading=h.ar8ibc31ux6f
26-
[slack]: https://kubernetes.slack.com/archives/C012F2GPMTQ
22+
Contributions to this project should conform to the [Developer Certificate of Origin][dco]. See the [next section](#sign-your-work) for more details.
23+
24+
## Sign Your Work
25+
26+
Contributions to this project should conform to the [Developer Certificate of Origin][dco]. You need to sign-off your git commits before sending the pull requests. The sign-off is a single line of text at the end of the commit message. The signature consists of your official name and email address. These two details should match with the name and email address used in the Git commit. All your commits need to be signed. Your signature certifies that you wrote the patch or otherwise have the right to contribute the material. The rules are pretty simple, if you can certify the below (from
27+
[developercertificate.org][dco]):
28+
29+
```
30+
Developer Certificate of Origin
31+
Version 1.1
32+
33+
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
34+
1 Letterman Drive
35+
Suite D4700
36+
San Francisco, CA, 94129
37+
38+
Everyone is permitted to copy and distribute verbatim copies of this
39+
license document, but changing it is not allowed.
40+
41+
42+
Developer's Certificate of Origin 1.1
43+
44+
By making a contribution to this project, I certify that:
45+
46+
(a) The contribution was created in whole or in part by me and I
47+
have the right to submit it under the open source license
48+
indicated in the file; or
49+
50+
(b) The contribution is based upon previous work that, to the best
51+
of my knowledge, is covered under an appropriate open source
52+
license and I have the right under that license to submit that
53+
work with modifications, whether created in whole or in part
54+
by me, under the same open source license (unless I am
55+
permitted to submit under a different license), as indicated
56+
in the file; or
57+
58+
(c) The contribution was provided directly to me by some other
59+
person who certified (a), (b) or (c) and I have not modified
60+
it.
61+
62+
(d) I understand and agree that this project and the contribution
63+
are public and that a record of the contribution (including all
64+
personal information I submit with it, including my sign-off) is
65+
maintained indefinitely and may be redistributed consistent with
66+
this project or the open source license(s) involved.
67+
```
68+
69+
Then you just add a line to every git commit message:
70+
71+
Signed-off-by: Joe Smith <[email protected]>
72+
73+
Use your real name (sorry, no pseudonyms or anonymous contributions.)
74+
75+
If you set your `user.name` and `user.email` git configs, you can sign your commit automatically with `git commit -s`.
76+
77+
Note: If your git config information is set properly then viewing the `git log` information for your commit will look something like this:
78+
79+
```
80+
Author: Joe Smith <[email protected]>
81+
Date: Thu Feb 2 11:41:15 2018 -0800
82+
83+
Update README
84+
85+
Signed-off-by: Joe Smith <[email protected]>
86+
```
87+
88+
Notice the `Author` and `Signed-off-by` lines match. If they don't your PR will be rejected by the automated DCO check.
89+
90+
## Pull Request Workflow
91+
92+
- Fork the repository and clone it your work directory
93+
- Create a topic branch from where you want to base your work
94+
- This is usually the `main` branch.
95+
- Only target release branches if you are certain your fix must be on that
96+
branch.
97+
- To quickly create a topic branch based on `main`; ``git checkout -b
98+
my-bug-fix upstream/main`` (Here `upstream` is alias for the remote repo)
99+
- Make commits of logical units
100+
- Make sure your commit messages are in [the proper format][commit-message].
101+
Also include any related GitHub issue references in the commit message.
102+
- Push your changes to a topic branch in your fork of the repository
103+
- Submit a pull request
104+
105+
Example:
106+
107+
```shell
108+
git remote add upstream https://github.com/servicebinding/<repo>.git
109+
git fetch upstream
110+
git checkout -b my-bug-fix upstream/main
111+
git commit -a
112+
git push origin my-bug-fix
113+
```
114+
115+
### Staying in sync with upstream
116+
117+
When your branch gets out of sync with the `upstream/main` branch, use the
118+
following to update:
119+
120+
``` shell
121+
git checkout my-bug-fix
122+
git fetch upstream
123+
git rebase upstream/main
124+
git push --force-with-lease origin my-bug-fix
125+
```
126+
127+
### Updating pull requests
128+
129+
If your PR fails to pass CI or needs changes based on code review, you'll most
130+
likely want to squash these changes into existing commits.
131+
132+
If your pull request contains a single commit or your changes are related to the
133+
most recent commit, you can simply amend the commit.
134+
135+
```
136+
git add .
137+
git commit --amend
138+
git push --force-with-lease origin my-bug-fix
139+
```
140+
141+
If you need to squash changes into an earlier commit, you can use:
142+
143+
```
144+
git add .
145+
git commit --fixup <commit>
146+
git rebase -i --autosquash main
147+
git push --force-with-lease origin my-bug-fix
148+
```
27149

28-
## Issues
29-
If you catch an error in the specification’s text, or if you write an
30-
implementation, please let us know by opening an issue or pull request at our
31-
[GitHub repository][repo].
150+
Please add a comment in the PR indicating your new changes are ready to review.
32151

33-
[repo]: https://github.com/servicebinding/spec
152+
[conduct]: https://github.com/servicebinding/spec/blob/main/CODE_OF_CONDUCT.md
153+
[dco]: http://developercertificate.org
154+
[commit-message]: https://cbea.ms/git-commit/

0 commit comments

Comments
 (0)