types.proto RawHistoryFolder
1// SPDX-License-Identifier: MIT
2
3syntax = "proto3";
4
5package ermite;
6
7import "ermite/signature.proto";
8import "google/protobuf/timestamp.proto";
9
10// Signature identifies who did something in Git and when: the author or the
11// committer of a commit.
12message Signature {
13 // Name is the person's name as recorded in the commit.
14 string name = 1;
15 // Email is the person's email address as recorded in the commit.
16 string email = 2;
17 // Time is when the action happened. The time zone offset of the commit is
18 // not kept.
19 google.protobuf.Timestamp time = 3;
20}
21
22// Commit is the metadata of one Git commit.
23message Commit {
24 // Id is the full object id (40 lowercase hexadecimal characters for SHA-1).
25 string id = 1;
26 // ParentIds are the ids of the parent commits, first parent first. Empty for
27 // a root commit.
28 repeated string parent_ids = 2;
29 // Author is who wrote the change.
30 Signature author = 3;
31 // Committer is who recorded the commit.
32 Signature committer = 4;
33 // Summary is the first line of the message, without the line break.
34 string summary = 5;
35 // Message is the full commit message, including the summary. Text that is
36 // not valid UTF-8 is converted with the replacement character.
37 string message = 6;
38 // Verification tells whether and how the commit is signed. Unset on
39 // servers without the "commit_signatures" feature.
40 CommitVerification verification = 7;
41}
42
43// MergeMode is how a merge request is merged. Both modes need the target to
44// be an ancestor of the head: a branch behind its target is rebased by its
45// author and pushed again, the server never rebases nor creates merge commits.
46enum MergeMode {
47 // Not set. In MergeMergeRequestRequest.mode it means fast-forward. Rejected
48 // in RepoSettings.allowed_merge_modes. Returned on a merge request that was
49 // not merged.
50 MERGE_MODE_UNSPECIFIED = 0;
51 // The target branch moves to the head. No commit is created and the
52 // signatures of the branch's commits are kept.
53 MERGE_MODE_FAST_FORWARD = 1;
54 // One new commit is created with the tree of the head and the target as
55 // only parent, signed by the server's key (see ServerService.GetSigningKey).
56 // Its author is the author of the first commit of the branch, the other
57 // authors are added as "Co-authored-by:" trailers, and its message is the
58 // title, " (!<number>)", a blank line and the list of the squashed commits'
59 // summaries.
60 MERGE_MODE_SQUASH = 2;
61}