/Cake.Gerrit

A Cake Addin to post reviews/comments/labels to Gerrit Code Review

Primary LanguageC#

Cake.Gerrit

A Cake Addin to post reviews/comments/labels to Gerrit Code Review

Usage

#addin "Cake.Cake.Gerrit&loaddependencies=true"
var gerritLogin = new Cake.Gerrit.Api.Authentication.GerritAuthConfig{
	Host = "gerrit.somecompany.com",
	User = "gerrituser",
	PrivateKeyFilePath = @"C:\keys\gerrit\id_rsa"
};

var commitSha = new Cake.Gerrit.Connector.References.GerritCommitInfo(lastCommit.Sha);

Task("Gerrit")

    .Does(() => 
    {
      AddMessage(gerritLogin, commitSha, "Adding a message to Gerrit");
    });

Usage:

AddCodeReview(GerritAuthConfig authSettings, GerritCommitInfo commitInfo, int n)
AddLabel(GerritAuthConfig authSettings, GerritCommitInfo commitInfo, string label, int n)
AddVerified(GerritAuthConfig authSettings, GerritCommitInfo commitInfo, int n)
AddMessage( GerritAuthConfig authSettings, GerritCommitInfo commitInfo, string message)

README file made with my favorite MD editor