-
Notifications
You must be signed in to change notification settings - Fork 84
feat: remediation commits #171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
d872856
b3869f9
4d85227
92df434
09b4bc7
d2fbe38
e63bdf6
2cdd698
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| name: Release | ||
| "on": | ||
| push: | ||
| branches: | ||
| - master | ||
| jobs: | ||
| release: | ||
| name: release | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - uses: actions/setup-node@v2 | ||
| with: | ||
| node-version: lts/* | ||
| cache: npm | ||
| - run: npm ci | ||
| - run: npx semantic-release | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| name: Test | ||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| pull_request: | ||
| types: [opened, synchronize] | ||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - uses: actions/setup-node@v2 | ||
| with: | ||
| node-version: "lts/*" | ||
| cache: npm | ||
| - run: npm ci | ||
| - run: npm test |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,5 @@ | ||
| # Probot: DCO | ||
|
|
||
| [](https://greenkeeper.io/) | ||
|
|
||
| a GitHub Integration built with [probot](https://github.com/probot/probot) that enforces the [Developer Certificate of Origin](https://developercertificate.org/) (DCO) on Pull Requests. It requires all commit messages to contain the `Signed-off-by` line with an email address that matches the commit author. | ||
|
|
||
| ## Usage | ||
|
|
@@ -10,6 +8,35 @@ a GitHub Integration built with [probot](https://github.com/probot/probot) that | |
|
|
||
| See [docs/deploy.md](docs/deploy.md) if you would like to run your own instance of this plugin. | ||
|
|
||
| ## Modes of operations | ||
|
|
||
| ### Default | ||
|
|
||
| By default, Probot DCO enforces the presence of [valid DCO signoffs](#how-it-works) on all commits (excluding bots and merges). If a PRs contains commits that lack a valid Signed-off-by line, they are blocked until a correctly signed-off revision of the commit is pushed. This closely mirrors the upstream Linux kernel process. | ||
|
|
||
| ### Individual remediation commit support | ||
|
|
||
| Optionally, a project can allow individual remediation commit support, where the failing commit's author can push an additional properly signed-off commit with additional text in the commit log that indicates they apply their signoff retroactively. | ||
|
|
||
| To enable this, place the following configuration file in `.github/dco.yml` on the default branch: | ||
|
|
||
| ```yaml | ||
| allowRemediationCommits: | ||
| individual: true | ||
| ``` | ||
|
|
||
| ### Third-party remediation support | ||
|
|
||
| Additionally, a project can allow third-parties to sign off on an author's behalf by pushing an additional properly signed-off commit with additional text in the commit log that indicates they sign off on behalf of the author. Third-party remediation requires individual remediation to be enabled. | ||
|
|
||
| To enable this, place the following configuration file in `.github/dco.yml` on the default branch: | ||
|
|
||
| ```yaml | ||
| allowRemediationCommits: | ||
| individual: true | ||
| thirdParty: true | ||
|
Comment on lines
+35
to
+37
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The https://github.com/brianwarner/dco/blob/eb53e5d32ce5d48b1467a581ed0ea404dc0a349c/index.js#L186 I think we should change the sitting from an object to a string enum allowRemediationCommits: individual # or: thirdPartyPlease let me know if you have any concerns about this change. |
||
| ``` | ||
|
|
||
| ### Skipping sign-off for organization members | ||
|
|
||
| It is possible to disable the check for commits authored and [signed](https://help.github.com/articles/signing-commits-using-gpg/) by members of the organization the repository belongs to. To do this, place the following configuration file in `.github/dco.yml` on the default branch: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| const { createNodeMiddleware, createProbot } = require('probot') | ||
|
|
||
| const app = require('../../../') | ||
|
|
||
| module.exports = createNodeMiddleware(app, { | ||
| probot: createProbot(), | ||
| webhooksPath: '/api/github/webhooks' | ||
| }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add instructions on how to add remediation commits using
gitand the GitHub Web UI? I know you add instructions to the check runs which is great, but I think we should document it here as well, what do you think?If I understand it correctly, ideally remediation commits would be empty commits with the correct messages, but there is no way to add empty commits using the GitHub Web UI as far as I know.