commit | beae81fde3f7f72f085ffd661b271f4d1405689c | [log] [tgz] |
---|---|---|
author | Myriam Anis <myriamanis@google.com> | Wed Mar 13 14:31:42 2024 +0000 |
committer | Myriam Anis <myriamanis@google.com> | Thu Mar 14 09:21:20 2024 +0000 |
tree | b97872e89dfa0eb575fee04a3aaf8a056af31123 | |
parent | 9c552553075fe5cc31a2a05aa82aed52ee28303a [diff] |
Add ChangeInput definition to gerrit entities. NOTE FOR REVIEWERS - original patch and result patch are not identical. PLEASE REVIEW CAREFULLY. Diffs between the patches: // Next ID: 25 > +message ChangeInput { > + // The change repository. > + optional string project = 1; > + > + // The name of the target branch. The `refs/heads/` prefix is omitted. > + optional string branch = 2; > + > + // Commit message. > + optional string subject = 3; > + > + optional string topic = 4; > + optional ChangeStatus status = 5; > + optional bool is_private = 6; > + optional bool work_in_progress = 7; > + > + // The below fields are only relevant for creating change requests. > + > + oneof Base { > + // The new change will be created onto this Gerrit change. > + optional string base_change = 8; > + > + // A 40-digit hex SHA-1 of the commit which will be the parent commit of the newly > + // created change. If set, it must be a merged commit on the destination branch. > + // This field is mutually exclusive with `base_change`. > + // If neither `base_commit` nor `base_change` are set, the target branch tip will > + // be used as the parent commit. > + optional string base_commit = 9; > + } > + optional bool new_branch = 10; > + map<string, string> validation_options = 11; > + > + // Maps custom keys to custom values that are tied to a specific change, > + // both in the form of strings. > + // For Cog, this is needed to set the cogws key. > + // This can be deprecated once b/288098006 is resolved. > + map<string, string> custom_keyed_values = 12; > + optional MergeInput merge = 13; > + optional ApplyPatchInput patch = 14; > + optional AccountInput author = 15; > + Repeated ListChangesOption response_format_options = 16; > +} > + > +// Serialized form of com.google.gerrit.enities.ChangeMessage. > +// Serialized form of com.google.gerrit.extensions.client.ChangeStatus. > +// Next ID: 4 > +enum ChangeStatus { > + NEW = 0; > + MERGED = 1; > + ABANDONED = 2; > +} > + > +// Serialized form of com.google.gerrit.extensions.common.MergeInput. > +// Next ID: 5 > +message MergeInput { > + optional string source = 1; > + optional string source_branch = 2; > + optional string strategy = 3; > + optional bool allow_conflicts = 4; > +} > + > +// Serialized form of com.google.gerrit.extensions.api.changes.ApplyPatchInput. > +// Next ID: 2 > +message ApplyPatchInput { > + optional string patch = 1; > +} > + > +// Serialized form of com.google.gerrit.extensions.api.accounts.AccountInput. > +// Next ID: 8 > +message AccountInput { > + optional string username = 1; > + optional string name = 2; > + optional string display_name = 3; > + optional string email = 4; > + optional string ssh_key = 5; > + optional string http_password = 6; > + repeated string groups = 7; > +} > + > +// Serialized form of com.google.gerrit.extensions.client.ListChangesOption. > +// Next ID: 28 > +enum ListChangesOption { > + LABELS = 0; > + CURRENT_REVISION = 1; > + ALL_REVISIONS = 2; > + CURRENT_COMMIT = 3; > + ALL_COMMITS = 4; > + CURRENT_FILES = 5; > + ALL_FILES = 6; > + DETAILED_ACCOUNTS = 7; > + DETAILED_LABELS = 8; > + MESSAGES = 9; > + CURRENT_ACTIONS = 10; > + REVIEWED = 11; > + DRAFT_COMMENTS = 12; > + DOWNLOAD_COMMANDS = 13; > + WEB_LINKS = 14; > + CHECK = 15; > + CHANGE_ACTIONS = 16; > + COMMIT_FOOTERS = 17; > + PUSH_CERTIFICATES = 18; > + REVIEWER_UPDATES = 19; > + SUBMITTABLE = 20; > + TRACKING_IDS = 21; > + SKIP_MERGEABLE = 22; > + SKIP_DIFFSTAT = 23; > + SUBMIT_REQUIREMENTS = 24; > + CUSTOM_KEYED_VALUES = 25; > + STAR = 26; > + PARENTS = 27; > +} > + Original patch: diff --git a/proto/entities.proto b/proto/entities.proto old mode 100644 new mode 100644 --- a/proto/entities.proto +++ b/proto/entities.proto @@ -61,6 +61,50 @@ reserved 19; // assignee reserved 101; // note_db_state } + +// Serialized form of com.google.gerrit.enities.ChangeMessage. +// Next ID: 25 +message ChangeInput { + // The change repository. + optional string project = 1; + + // The name of the target branch. The `refs/heads/` prefix is omitted. + optional string branch = 2; + + // Commit message. + optional string subject = 3; + + optional string topic = 4; + optional ChangeStatus status = 5; + optional bool is_private = 6; + optional bool work_in_progress = 7; + + // The below fields are only relevant for creating change requests. + + oneof Base { + // The new change will be created onto this Gerrit change. + optional string base_change = 8; + + // A 40-digit hex SHA-1 of the commit which will be the parent commit of the newly + // created change. If set, it must b [[[Original patch trimmed due to size. Decoded string size: 3740. Decoded string SHA1: 0df815b94ab12c881e1d5d7fd403ac3713a54569.]]] Result patch: diff --git a/proto/entities.proto b/proto/entities.proto index 335db62..607c78d 100644 --- a/proto/entities.proto +++ b/proto/entities.proto @@ -63,6 +63,50 @@ } // Serialized form of com.google.gerrit.enities.ChangeMessage. +// Next ID: 25 +message ChangeInput { + // The change repository. + optional string project = 1; + + // The name of the target branch. The `refs/heads/` prefix is omitted. + optional string branch = 2; + + // Commit message. + optional string subject = 3; + + optional string topic = 4; + optional ChangeStatus status = 5; + optional bool is_private = 6; + optional bool work_in_progress = 7; + + // The below fields are only relevant for creating change requests. + + oneof Base { + // The new change will be created onto this Gerrit change. + optional string base_change = 8; + + // A 40-digit hex SHA-1 of the commit which will be the parent commit of the newly + // created change. If set, it must be a merged commit on the destination branch. + // This field is mu [[[Result patch trimmed due to size. Decoded string size: 3735. Decoded string SHA1: e4666adb9ebe76f851621fdabbf0cea00f0375fc.]]] NOTE FOR REVIEWERS - original patch and result patch are not identical. PLEASE REVIEW CAREFULLY. Diffs between the patches: // Serialized form of com.google.gerrit.extensions.api.changes.NotifyHandling. > +// Next ID: 4 > +enum NotifyHandling { > + NONE = 0; > + OWNER = 1; > + OWNER_REVIEWERS = 2; > + ALL = 3; > +} > + > +// Serialized form of com.google.gerrit.extensions.api.changes.RecipientType. > +// Next ID: 3 > +enum RecipientType { > + TO = 0; > + CC = 1; > + BCC = 2; > +} > + > +// Serialized form of com.google.gerrit.extensions.api.changes.NotifyInfo. > +// Next ID: 2 > +message NotifyInfo { > + repeated string accounts = 1; > +} > + Original patch: diff --git a/proto/entities.proto b/proto/entities.proto old mode 100644 new mode 100644 --- a/proto/entities.proto +++ b/proto/entities.proto @@ -62,8 +62,8 @@ reserved 101; // note_db_state } -// Serialized form of com.google.gerrit.enities.ChangeMessage. -// Next ID: 17 +// Serialized form of com.google.gerrit.extensions.common.ChangeInput. +// Next ID: 19 message ChangeInput { optional string project = 1; optional string branch = 2; @@ -81,6 +81,8 @@ optional ApplyPatchInput patch = 14; optional AccountInput author = 15; repeated ListChangesOption response_format_options = 16; + optional NotifyHandling notify = 17; + map<RecipientType, NotifyInfo> notify_details = 18; } // Serialized form of com.google.gerrit.enities.ChangeMessage. @@ -169,6 +171,29 @@ STAR = 26; PARENTS = 27; } + +// Serialized form of com.google.gerrit.extensions.api.changes.NotifyHandling. +// Next ID: 4 +enum NotifyHandling { + NONE = 0; + OWNER = 1; + OWNER_REVIEWERS = 2; + ALL = 3; +} + +// Se [[[Original patch trimmed due to size. Decoded string size: 1401. Decoded string SHA1: 008a5766e4b4e990dc35840f56b168b7d5dd0fc4.]]] Result patch: diff --git a/proto/entities.proto b/proto/entities.proto index 96e41a1..ed5ae5d 100644 --- a/proto/entities.proto +++ b/proto/entities.proto @@ -62,8 +62,8 @@ reserved 101; // note_db_state } -// Serialized form of com.google.gerrit.enities.ChangeMessage. -// Next ID: 17 +// Serialized form of com.google.gerrit.extensions.common.ChangeInput. +// Next ID: 19 message ChangeInput { optional string project = 1; optional string branch = 2; @@ -81,6 +81,8 @@ optional ApplyPatchInput patch = 14; optional AccountInput author = 15; repeated ListChangesOption response_format_options = 16; + optional NotifyHandling notify = 17; + map<RecipientType, NotifyInfo> notify_details = 18; } // Serialized form of com.google.gerrit.enities.ChangeMessage. @@ -170,6 +172,29 @@ PARENTS = 27; } +// Serialized form of com.google.gerrit.extensions.api.changes.NotifyHandling. +// Next ID: 4 +enum NotifyHandling { + NONE = 0; + OWNER = 1; + OWNER_REVIEWERS = 2; + ALL = 3; +} + +// Serialized form of [[[Result patch trimmed due to size. Decoded string size: 1409. Decoded string SHA1: d685a2917c95d7715b301a2b25fddc601409dbf0.]]] Release-Notes:skip Change-Id: I561cf42fa746fef1b1185a97328fb5c5e5d672e7
Gerrit is a code review and project management tool for Git based projects.
Gerrit makes reviews easier by showing changes in a side-by-side display, and allowing inline comments to be added by any reviewer.
Gerrit simplifies Git based project maintainership by permitting any authorized user to submit changes to the master Git repository, rather than requiring all approved changes to be merged in by hand by the project maintainer.
For information about how to install and use Gerrit, refer to the documentation.
Our canonical Git repository is located on googlesource.com. There is a mirror of the repository on Github.
Please report bugs on the issue tracker.
Gerrit is the work of hundreds of contributors. We appreciate your help!
Please read the contribution guidelines.
Note that we do not accept Pull Requests via the Github mirror.
The Developer Mailing list is repo-discuss on Google Groups.
Gerrit is provided under the Apache License 2.0.
Install Bazel and run the following:
git clone --recurse-submodules https://gerrit.googlesource.com/gerrit cd gerrit && bazel build release
The instruction how to configure GerritForge/BinTray repositories is here
On Debian/Ubuntu run:
apt-get update && apt-get install gerrit=<version>-<release>
NOTE: release is a counter that starts with 1 and indicates the number of packages that have been released with the same version of the software.
On CentOS/RedHat run:
yum clean all && yum install gerrit-<version>[-<release>]
On Fedora run:
dnf clean all && dnf install gerrit-<version>[-<release>]
Docker images of Gerrit are available on DockerHub
To run a CentOS 8 based Gerrit image:
docker run -p 8080:8080 gerritcodereview/gerrit[:version]-centos8
To run a Ubuntu 20.04 based Gerrit image:
docker run -p 8080:8080 gerritcodereview/gerrit[:version]-ubuntu20
NOTE: release is optional. Last released package of the version is installed if the release number is omitted.