Skip to content
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

[Feature]: --signoff #418

Open
kaovilai opened this issue Sep 23, 2024 · 3 comments
Open

[Feature]: --signoff #418

kaovilai opened this issue Sep 23, 2024 · 3 comments

Comments

@kaovilai
Copy link
Contributor

kaovilai commented Sep 23, 2024

Description

https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---signoff

Suggested Solution

oco --signoff <email>

if this takes too long we can alias.

Alternatives

set in some config file

or have a way to not have oco prompt for push oco config set OCO_GITPUSH=false
.. then we can && git commit --amend --signoff && git push --force

Additional Context

https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-the-commit-signoff-policy-for-your-repository#about-commit-signoffs

https://wiki.linuxfoundation.org/dco

For linux foundation, DCO is a requirement.

DCO sign-offs must be present on every single commit, or else the contribution will not be accepted.
A contributor agreement may be signed by a third party, like a company, on behalf of its employees, whereas the DCO is always an attestation by the author of the contribution.

@matscube
Copy link
Contributor

@kaovilai
How about using prepare-commit-msg hook?
By doing the following, the AI-generated message by oco will be set from the beginning when you commit with git.
This way, you can use all git options in combination.

$ oco hook set // set prepare-commit-msg hook
$ git commit --signoff // in addition to the signoff message, the message generated by oco is set from the beginning (overwriting is also possible)

image

@kaovilai
Copy link
Contributor Author

Sure if it would be documented as the way opencommit dev prefer to this issue.

@selcukusta
Copy link

Can we customize the message template on the prepare-commit-msg hook? For instance, I want to add the ticket ID as a prefix to the generated message by opencommit. Regex won't be a problem, please don't focus on this part.

Branch name: MPL-1234-some-bug-fixes
Commit message should be like this: "MPL-1234: ${generatedMessage}" and signoff ("signoff" can be added via git commit command as you mentioned above).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants