diff --git a/.builds/alpine.yml b/.builds/alpine.yml index f8d75d8b1..0df721a06 100644 --- a/.builds/alpine.yml +++ b/.builds/alpine.yml @@ -58,3 +58,14 @@ tasks: -o public \ "$include_dir/wlr/" zip -r ~/public.zip public/ + - check-dco: | + set +x + cd wlroots + [ "${CI_MERGE_REQUEST_TARGET_BRANCH_NAME:-}" = "" ] && exit + git rev-list "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME".. | while read -r rev; do + sob=$(git log -1 --pretty='%(trailers:key=Signed-off-by,separator= )') + if [ "$sob" = "" ]; then + echo "Commit $rev is missing a Signed-off-by trailer" + exit 1 + fi + done diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3b02ef16f..e5490fe34 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,10 @@ include: https://gitlab.freedesktop.org/emersion/dalligi/-/raw/master/templates/multi.yml +workflow: + rules: + - if: $CI_PIPELINE_SOURCE == "merge_request_event" + - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS + when: never + - if: $CI_COMMIT_BRANCH alpine: extends: .dalligi pages: true diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d9c49f7c2..03b91fe47 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -101,6 +101,17 @@ message as well. See [How to Write a Git Commit Message] for more details. +## Developer Certificate of Origin + +All commits must include a `Signed-off-by` trailer with your preferred name and +email address which indicates that you agree to the [Developer Certificate of +Origin]. If part of the patch has been authored by someone else, you should +also gather `Signed-off-by` trailers from them in addition to your own trailer. +These trailers certify that the commit can be submitted under the project's +open-source license. + +The trailer can be added with `git commit -s`. + ## Code Review When your changes are submitted for review, one or more core committers will @@ -473,6 +484,7 @@ static void subsurface_handle_surface_destroy(struct wl_listener *listener, [freedesktop wiki]: https://gitlab.freedesktop.org/freedesktop/freedesktop/-/wikis/home [linear, "recipe" style]: https://www.bitsnbites.eu/git-history-work-log-vs-recipe/ [git-rebase.io]: https://git-rebase.io/ +[Developer Certificate of Origin]: https://developercertificate.org/ [reference issues]: https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically [Code of Conduct]: https://www.freedesktop.org/wiki/CodeOfConduct/ [How to Write a Git Commit Message]: https://chris.beams.io/posts/git-commit/