introduces writeSignoffCommit and requireScore features#1205
introduces writeSignoffCommit and requireScore features#1205fuero wants to merge 7 commits intogitblit-org:masterfrom
Conversation
| messageBuilder.append("\n\n"); | ||
| for (Change change : ticket.getReviews(patchset)) { | ||
| UserModel ruser = gitblit.getUserModel(change.author); | ||
| messageBuilder.append(MessageFormat.format( |
There was a problem hiding this comment.
This looks like it would add a sign-off for someone who gave a negative review but the total score exceeded the minimum requirement. Am I reading that wrong?
There was a problem hiding this comment.
Nope, you're correct. Have a look at the follow-up commit, this should fix it.
|
@fuero I like this proposal. Do you consider it feature complete? |
|
I wonder if |
|
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.
|
|
As I understand it, the definition of Another setting containing the header name to be added could be introduced. The actual meaning of the As for it being feature complete: I've introduced this to meet our internal needs, which are evolving as well. |
|
Aren't both sources agreeing, that 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? |
|
@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. |
|
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 8130906. |
|
Hope this is ok, it does stick out from the other options now though. |
…ctual commit header name.
|
rebased to match current origin master |
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 reviewer@example.com' 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 :-)