pre-commit-ci / issues

public issues for https://pre-commit.ci
17 stars 3 forks source link

Signed-off-by / DCO line #144

Closed tykeal closed 2 years ago

tykeal commented 2 years ago

I'm always having to fix the auto update PRs because my projects all require a Signed-off-by (aka DCO) line. For some reason the DCO probot always flags it as valid, but I've got a check that does some "magic" to make pre-commit commit message validation work and gitlint always fails the check.

asottile commented 2 years ago

you'll need to provide more details, it's unclear what you're asking for but it sounds like this is a gitlint feature request?

tykeal commented 2 years ago

No, it's not feature request for gitlint itself. I'm asking for a way to configure the CI bot to add a Signed-off-by footer in the commit messages that it produces. They fail validation that gitlint is doing for me.

asottile commented 2 years ago

you'll need to show more information I still have no idea what you're talking about

tykeal commented 2 years ago

Here's what I end up having to do when I get an auto-update PR from the bot tykeal/homeassistant-rental-control#123

Note the footer of the commit message:

Signed-off-by: Andrew Grimberg <tykeal@bardicgrove.org>

This is done automatically for you when you issue a '-s' to git commit

My personal repositories as well as literally 100% of every other open source (and non-open) repository I work with all have hard requirements on this DCO line existing. The meaning behind it can be found here: https://developercertificate.org/

asottile commented 2 years ago

the autoupdate commit message is customizable -- feel free to add your DCO to it https://pre-commit.ci/#configuration-autoupdate_commit_msg

asottile commented 2 years ago

a bot itself cannot DCO -- the commits are signed though which is why probot is ok with it -- your tooling is the issue here I suspect since it doesn't recognize signed commits

tykeal commented 2 years ago

the autoupdate commit message is customizable -- feel free to add your DCO to it https://pre-commit.ci/#configuration-autoupdate_commit_msg

I have that set, all it does is modify the commit subject line. None of the rest of the commit message.

asottile commented 2 years ago
    autoupdate_commit_msg: |
        subject here

        Signed-off-by: Andrew Grimberg <tykeal@bardicgrove.org>

seems to work for me?

tykeal commented 2 years ago

Hmm... I'll give it a try. I was honestly expecting that when I set it that it wouldn't add in the the updated modules information. I sort of expect that it will still end up adding the update module information into the commit thereby breaking this in a different way since SBO is supposed to be a footer.

asottile commented 2 years ago

rather than assuming just try it ! otherwise you're wasting both of our times :P