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. Fast-forward needs the target
44// to be an ancestor of the head. Squash and merge commit need the head to
45// merge cleanly into the target, which holds when the branch is behind its
46// target without conflict. The server never rebases: a branch that conflicts
47// is rebased by its author and pushed again.
48enum MergeMode {
49 // Not set. In MergeMergeRequestRequest.mode it means fast-forward. Rejected
50 // in RepoSettings.allowed_merge_modes. Returned on a merge request that was
51 // not merged.
52 MERGE_MODE_UNSPECIFIED = 0;
53 // The target branch moves to the head. No commit is created and the
54 // signatures of the branch's commits are kept.
55 MERGE_MODE_FAST_FORWARD = 1;
56 // One new commit is created with the tree of the merge of the head into the
57 // target (the tree of the head when the target is its ancestor) and the
58 // target tip as only parent, signed by the server's key (see ServerService.GetSigningKey).
59 // Its author is the author of the first commit of the branch, the other
60 // authors are added as "Co-authored-by:" trailers, and its message is the
61 // title, " (!<number>)", a blank line and the list of the squashed commits'
62 // summaries.
63 MERGE_MODE_SQUASH = 2;
64 // One new commit is created with two parents, the target tip then the head,
65 // and the tree of the merge. It is signed by the server's key (see
66 // ServerService.GetSigningKey); its author and committer are the server
67 // identity. Its message is "Merge branch '<source>' into <target> (!<n>)",
68 // a blank line and the title. The signatures of the branch's commits are
69 // kept. Needs the "merge_requests.mergeability" feature.
70 MERGE_MODE_MERGE_COMMIT = 3;
71}