// SPDX-License-Identifier: MIT syntax = "proto3"; package ermite; import "ermite/signature.proto"; import "google/protobuf/timestamp.proto"; // Signature identifies who did something in Git and when: the author or the // committer of a commit. message Signature { // Name is the person's name as recorded in the commit. string name = 1; // Email is the person's email address as recorded in the commit. string email = 2; // Time is when the action happened. The time zone offset of the commit is // not kept. google.protobuf.Timestamp time = 3; } // Commit is the metadata of one Git commit. message Commit { // Id is the full object id (40 lowercase hexadecimal characters for SHA-1). string id = 1; // ParentIds are the ids of the parent commits, first parent first. Empty for // a root commit. repeated string parent_ids = 2; // Author is who wrote the change. Signature author = 3; // Committer is who recorded the commit. Signature committer = 4; // Summary is the first line of the message, without the line break. string summary = 5; // Message is the full commit message, including the summary. Text that is // not valid UTF-8 is converted with the replacement character. string message = 6; // Verification tells whether and how the commit is signed. Unset on // servers without the "commit_signatures" feature. CommitVerification verification = 7; } // MergeMode is how a merge request is merged. Fast-forward needs the target // to be an ancestor of the head. Squash and merge commit need the head to // merge cleanly into the target, which holds when the branch is behind its // target without conflict. The server never rebases: a branch that conflicts // is rebased by its author and pushed again. enum MergeMode { // Not set. In MergeMergeRequestRequest.mode it means fast-forward. Rejected // in RepoSettings.allowed_merge_modes. Returned on a merge request that was // not merged. MERGE_MODE_UNSPECIFIED = 0; // The target branch moves to the head. No commit is created and the // signatures of the branch's commits are kept. MERGE_MODE_FAST_FORWARD = 1; // One new commit is created with the tree of the merge of the head into the // target (the tree of the head when the target is its ancestor) and the // target tip as only parent, signed by the server's key (see ServerService.GetSigningKey). // Its author is the author of the first commit of the branch, the other // authors are added as "Co-authored-by:" trailers, and its message is the // title, " (!)", a blank line and the list of the squashed commits' // summaries. MERGE_MODE_SQUASH = 2; // One new commit is created with two parents, the target tip then the head, // and the tree of the merge. It is signed by the server's key (see // ServerService.GetSigningKey); its author and committer are the server // identity. Its message is "Merge branch '' into (!)", // a blank line and the title. The signatures of the branch's commits are // kept. Needs the "merge_requests.mergeability" feature. MERGE_MODE_MERGE_COMMIT = 3; }