-
Notifications
You must be signed in to change notification settings - Fork 8
fix #28 - feat: Create a pre-commit hook to force signed commits #29
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
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,35 @@ | ||
| #!/bin/sh | ||
| # | ||
| # Copyright 2026 The Serverless Workflow Specification Authors | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # | ||
|
|
||
| # This hook checks that the commit message includes a "Signed-off-by" line. | ||
|
|
||
| COMMIT_MSG=$(cat "$1") | ||
|
|
||
| # Check for Signed-off-by line | ||
| if ! echo "$COMMIT_MSG" | grep -qE '^Signed-off-by: .+ <.+@.+>'; then | ||
| cat <<EOF | ||
| ERROR: Commit message is missing DCO sign-off. | ||
|
|
||
| This project requires all commits to include a Developer Certificate | ||
| of Origin (DCO) sign-off. To sign your commit, use: | ||
|
|
||
| git commit -s -m "Your commit message" | ||
|
fantonangeli marked this conversation as resolved.
|
||
| EOF | ||
| exit 1 | ||
| fi | ||
|
|
||
| exit 0 | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
|
Member
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. Note: I needed to create an initial |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| { | ||
| "name": "serverless-workflow-editor", | ||
| "version": "0.0.0", | ||
| "private": true, | ||
| "description": "CNCF Serverless Workflow Specification Visual Editor", | ||
| "license": "Apache-2.0", | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "https://github.com/serverlessworkflow/editor.git" | ||
| }, | ||
| "scripts": { | ||
| "prepare": "husky" | ||
|
fantonangeli marked this conversation as resolved.
|
||
| }, | ||
| "devDependencies": { | ||
| "husky": "^9.1.7" | ||
| }, | ||
| "engines": { | ||
| "node": ">=20" | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.