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