Skip to content

Commit a86e3de

Browse files
author
Jesse
authored
[PECO-246] Introduce DCO requirement (#49)
1 parent 2528bdc commit a86e3de

File tree

2 files changed

+93
-2
lines changed

2 files changed

+93
-2
lines changed

.github/workflows/dco-check.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: DCO Check
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
check:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Check for DCO
10+
id: dco-check
11+
uses: tisonkun/actions-dco@v1.1
12+
- name: Comment about DCO status
13+
uses: actions/github-script@v6
14+
if: ${{ failure() }}
15+
with:
16+
script: |
17+
github.rest.issues.createComment({
18+
issue_number: context.issue.number,
19+
owner: context.repo.owner,
20+
repo: context.repo.repo,
21+
body: `Thanks for your contribution! To satisfy the DCO policy in our \
22+
[contributing guide](https://github.com/databricks/databricks-sql-nodejs/blob/main/CONTRIBUTING.md) \
23+
every commit message must include a sign-off message. One or more of your commits is missing this message. \
24+
You can reword previous commit messages with an interactive rebase (\`git rebase -i main\`).`
25+
})

CONTRIBUTING.md

Lines changed: 68 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,72 @@
1-
# Contributing
1+
# Contributing Guide
22

3-
To contribute to this repository, fork it and send pull requests.
3+
We happily welcome contributions to this package. We use [GitHub Issues](https://github.com/databricks/databricks-sql-nodejs/issues) to track community reported issues and [GitHub Pull Requests](https://github.com/databricks/databricks-sql-nodejs/pulls) for accepting changes.
4+
5+
Contributions are licensed on a license-in/license-out basis.
6+
7+
## Communication
8+
9+
Before starting work on a major feature, please reach out to us via GitHub, Slack, email, etc. We will make sure no one else is already working on it and ask you to open a GitHub issue.
10+
A "major feature" is defined as any change that is > 100 LOC altered (not including tests), or changes any user-facing behavior.
11+
We will use the GitHub issue to discuss the feature and come to agreement.
12+
This is to prevent your time being wasted, as well as ours.
13+
The GitHub review process for major features is also important so that organizations with commit access can come to agreement on design.
14+
If it is appropriate to write a design document, the document must be hosted either in the GitHub tracking issue, or linked to from the issue and hosted in a world-readable location.
15+
Specifically, if the goal is to add a new extension, please read the extension policy.
16+
Small patches and bug fixes don't need prior communication.
17+
18+
## Sign your work
19+
20+
The sign-off is a simple line at the end of the explanation for the patch. Your signature certifies that you wrote the patch or otherwise have the right to pass it on as an open-source patch. The rules are pretty simple: if you can certify the below (from developercertificate.org):
21+
22+
```
23+
Developer Certificate of Origin
24+
Version 1.1
25+
26+
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
27+
1 Letterman Drive
28+
Suite D4700
29+
San Francisco, CA, 94129
30+
31+
Everyone is permitted to copy and distribute verbatim copies of this
32+
license document, but changing it is not allowed.
33+
34+
35+
Developer's Certificate of Origin 1.1
36+
37+
By making a contribution to this project, I certify that:
38+
39+
(a) The contribution was created in whole or in part by me and I
40+
have the right to submit it under the open source license
41+
indicated in the file; or
42+
43+
(b) The contribution is based upon previous work that, to the best
44+
of my knowledge, is covered under an appropriate open source
45+
license and I have the right under that license to submit that
46+
work with modifications, whether created in whole or in part
47+
by me, under the same open source license (unless I am
48+
permitted to submit under a different license), as indicated
49+
in the file; or
50+
51+
(c) The contribution was provided directly to me by some other
52+
person who certified (a), (b) or (c) and I have not modified
53+
it.
54+
55+
(d) I understand and agree that this project and the contribution
56+
are public and that a record of the contribution (including all
57+
personal information I submit with it, including my sign-off) is
58+
maintained indefinitely and may be redistributed consistent with
59+
this project or the open source license(s) involved.
60+
```
61+
62+
Then you just add a line to every git commit message:
63+
64+
```
65+
Signed-off-by: Joe Smith <joe.smith@email.com>
66+
Use your real name (sorry, no pseudonyms or anonymous contributions.)
67+
```
68+
69+
If you set your `user.name` and `user.email` git configs, you can sign your commit automatically with `git commit -s`.
470

571
## Project structure
672

0 commit comments

Comments
 (0)