app
app copied to clipboard
Use as "pre-commit" hook?
Is it possible to run the DCO app before each commit and block it in case the DCO check fails?
GitHub does not allow custom hooks, however we'd like to check that every commit happening to our repository contains a "Signed-of-by" line.
we'd like to check that every commit happening to our repository contains a "Signed-of-by" line
Would you like a badge showing that every commit in a repository does have the "Signed-of-by" line? Or do you want to prevent new commits to be added that do not?
We want to prevent commits to be added that do not contain a valid Signed-of-by line. Currently we use GitHub as a mirror and our own Git server setup validates each push before committing anything. Moving over to GitHub as our main and only Git source would ideally have this hard requirement, too.
You can prevent direct pushes to a repository's default branch using branch protection settings, enforcing using pull requests. And on pull requests, DCO will set a status to failed when the commit messages do not have the signed-of-by line. Will that work for you?