drone/gitrpc/proto/merge.proto
Enver Bisevac 13a456e357 [scm-58] Add merge-check and Integrate with PR (#318)
Co-authored-by: Johannes Batzill <johannes.batzill@harness.io>
2023-02-11 23:22:12 -08:00

53 lines
1.6 KiB
Protocol Buffer

syntax = "proto3";
package rpc;
option go_package = "github.com/harness/gitness/gitrpc/rpc";
import "shared.proto";
// DiffService is a service which provides RPCs to inspect differences
// introduced between a set of commits.
service MergeService {
rpc Merge(MergeRequest) returns (MergeResponse) {}
}
message MergeRequest {
WriteRequest base = 1;
// head_branch is the source branch we want to merge
string head_branch = 2;
// base_branch is the branch into which the given commit shall be merged and whose
// reference is going to be updated.
string base_branch = 3;
// title is the title to use for the merge commit.
string title = 4;
// message is the message to use for the merge commit.
string message = 5;
// author is the person who originally wrote the code
Identity author = 6;
// committer is the person who last applied the patch
Identity committer = 7;
// ref_type is an otional value and is used to generate the full
// reference in which the merge result is stored.
RefType ref_type = 8;
// ref_name is an otional value and is used to generate the full
// reference in which the merge result is stored.
string ref_name = 9;
// head_expected_sha is commit sha on the head branch, if head_expected_sha is older
// than the head_branch latest sha then merge will fail.
string head_expected_sha = 10;
// force merge
bool force = 11;
// delete branch after merge
bool delete_head_branch = 12;
}
message MergeResponse {
// The merge_sha is merge commit between head_sha and base_sha
string merge_sha = 1;
string base_sha = 2;
string head_sha = 3;
}