Skip to content

Add a new check-commits CI job using gitlint#1263

Open
phlogistonjohn wants to merge 2 commits intoceph:masterfrom
phlogistonjohn:jjm-gitlint
Open

Add a new check-commits CI job using gitlint#1263
phlogistonjohn wants to merge 2 commits intoceph:masterfrom
phlogistonjohn:jjm-gitlint

Conversation

@phlogistonjohn
Copy link
Copy Markdown
Collaborator

Add a new check-commits CI job that uses gitlint to enforce some basic parameters of git commit messages in contributions to go-ceph. In particular we want to require the Signed-off-by on all commits. We were kinda-sorta requiring it but not always enforcing it. ceph/ceph has been requiring it for a long time.

I also think it's even more important now that people declare they have
the right to contribute change now that more and more tools are being
used to generate code.

I've used gitlint in other projects with success so I chose that rather than agonize other available tools.

@phlogistonjohn phlogistonjohn added the no-API This PR does not include any changes to the public API of a go-ceph package label Apr 29, 2026
@phlogistonjohn phlogistonjohn force-pushed the jjm-gitlint branch 2 times, most recently from 5c66ac2 to 5c061fc Compare April 29, 2026 17:51
@phlogistonjohn phlogistonjohn requested a review from anoopcs9 April 29, 2026 17:53
@phlogistonjohn phlogistonjohn changed the title [WIP] Add a new check-commits CI job using gitlint Add a new check-commits CI job using gitlint Apr 29, 2026
Comment thread .gitlint
[title-must-not-contain-word]
# Comma-separated list of words that should not occur in the title. Matching is case
# insensitive. It's fine if the keyword occurs as part of a larger word (so "WIPING"
# will not cause a violation, but "WIP: my title" will.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing a closing parenthesis?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so, but re-reading the comment I see that wip,WIP is probably redundant because the doc says this is case insensitive.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was indicating the only opening parenthesis ( seen here in the comment.

Comment thread .gitlint
@anoopcs9
Copy link
Copy Markdown
Collaborator

Feel free to ignore but pasting the warning I saw from corresponding CI runs:

Run actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
  with:
    check-latest: false
    token: ***
    update-environment: true
    allow-prereleases: false
    freethreaded: false
Warning: Neither 'python-version' nor 'python-version-file' inputs were supplied. Attempting to find '.python-version' file.
Warning: .python-version doesn't exist.
Warning: The `python-version` input is not set.  The version of Python currently in `PATH` will be used.

@phlogistonjohn
Copy link
Copy Markdown
Collaborator Author

Feel free to ignore but pasting the warning I saw from corresponding CI runs:

Run actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
  with:
    check-latest: false
    token: ***
    update-environment: true
    allow-prereleases: false
    freethreaded: false
Warning: Neither 'python-version' nor 'python-version-file' inputs were supplied. Attempting to find '.python-version' file.
Warning: .python-version doesn't exist.
Warning: The `python-version` input is not set.  The version of Python currently in `PATH` will be used.

Added the option to suppress the warnings.

@phlogistonjohn phlogistonjohn requested a review from anoopcs9 April 30, 2026 18:11
@phlogistonjohn
Copy link
Copy Markdown
Collaborator Author

@Mergifyio rebase

This will be later used to check commit messages.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
This uses the gitlint tool to check for basic formatting of commit
messages. In particular we want to require the Signed-off-by on all
commits. We were kinda-sorta requiring it but not always enforcing it.
ceph/ceph has been requiring it for a long time.

I also think it's even more important now that people declare they have
the right to contribute change now that more and more tools are being
used to generate code.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented May 2, 2026

Deprecation notice: This pull request comes from a fork and was rebased using bot_account impersonation. This capability will be removed on July 1, 2026. After this date, the rebase action will no longer be able to rebase fork pull requests with this configuration. Please switch to the update action/command to ensure compatibility going forward.

@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented May 2, 2026

rebase

✅ Branch has been successfully rebased

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-API This PR does not include any changes to the public API of a go-ceph package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants