gitblit icon indicating copy to clipboard operation
gitblit copied to clipboard

introduces writeSignoffCommit and requireScore features

Open fuero opened this issue 8 years ago • 9 comments

This pull request introduces 2 features to Gitblit:

writeSignoffCommit: When using the merge button on a ticket, all reviewers are added in a 'Signed-off-by: reviewer [email protected]' commit message line. Can be enabled/disabled in the same manner as requireApproval. Defaults to being disabled.

requireScore: Allows specifying a particular score a ticket should have (i.e. a number of people who have to sign off on it) before the merge button appears in the web ui. Configurable per repo, requires the requireApproval setting. Defaults to being disabled.

I hope the approach is clean enough and that other people want this as well.

This would save us from setting up Gerrit :-)

fuero avatar Feb 28 '17 20:02 fuero

@fuero I like this proposal. Do you consider it feature complete?

gitblit avatar Mar 01 '17 13:03 gitblit

I wonder if Reviewed-by would be more appropriate, see conventions.

gitblit avatar Mar 01 '17 13:03 gitblit

I wonder if Reviewed-by would be more appropriate, see conventions https://git.wiki.kernel.org/index.php/CommitMessageConventions.

Agreed. Or make it configurable what the line is, if you need it to be Signed-off in your organisation.

flaix avatar Mar 01 '17 13:03 flaix

As I understand it, the definition of sign-off is somewhat fluent.

Another setting containing the header name to be added could be introduced.

The actual meaning of the sign-off line must be defined by the people relying on it (the repo owners).

As for it being feature complete: I've introduced this to meet our internal needs, which are evolving as well.

fuero avatar Mar 01 '17 13:03 fuero

Aren't both sources agreeing, that Signed-off-by means that the signer has authorship of the code, while reviewed-by is for people reviewing?

Anyhow, as for an additional setting, I'd personally rather vote for using the existing setting, and if it has no value, nothing is added. I'm a friend of controlling setting proliferation.

Maybe the documentation should mention that this is only valid if a merge commit is created, or is that obvious enough for everyone?

flaix avatar Mar 01 '17 16:03 flaix

@fzs I've adapted my code to reflect your idea. Is there a way to add the conventions link to message displayed in the GUI? It didn't seem to like HTML tags there.

fuero avatar Mar 06 '17 13:03 fuero

That should work fine. But it is better to keep the link in code so that it can be changed more easily and allows for easier translation. See commit 8130906c48dcd4886bb8b28a6c1055489b499140.

flaix avatar Mar 07 '17 08:03 flaix

Hope this is ok, it does stick out from the other options now though.

fuero avatar Apr 06 '17 22:04 fuero

rebased to match current origin master

fuero avatar Apr 10 '17 14:04 fuero