Commit Graph

5 Commits (98d3bb27f08135a49722ff8702dbf551b18267b5)

Author SHA1 Message Date
Mike Frysinger 98d3bb27f0 gerrit_client: changes: support raw search queries
The --param option does not support extended bool logic.  It forces
every search query to be AND-ed together.  There is no way to do more
OR joins or subclauses like "( X OR Y ) AND Z".

Let's add a new --query option to let people type out the full string
themselves rather than try and support this bool logic directly.

Bug: b/282975918
Test: ./gerrit_client.py changes --host https://chromium-review.googlesource.com --query '( owner:vapier OR owner:briannorris ) is:open project:chromiumos/chromite'
Change-Id: I792e4deec34797295824ec13da41f45eb85e65ae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4638081
Reviewed-by: Greg Edelston <gredelston@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Auto-Submit: Mike Frysinger <vapier@chromium.org>
2 years ago
Ben Pastene 281edf7577 Add a 'setlabel' command to gerrit_client.py
And add a hook for it in the gerrit recipe_module.

This will allow invocations of gerrit_client to set votes like
"code-review-1" or "commit-queue+1" on CLs. This will be used by bots
to control CLs they just created with update_files().

Bug: 1250084
Change-Id: I888458983165fed5882e5c37cba4a69dbfb9b810
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3207266
Commit-Queue: Ben Pastene <bpastene@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
4 years ago
Marco Georgaklis 85557a08f4 Implemented suppport for getrelatedchanges endpoint in gerrit module
The endpoint documentation can be found here:
https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#get-related-changes

This involved adding support for the command in gerrit_client and
gerrit_util and then incorporating functionality and testing into
the gerrit recipe module.

The reasoning for this is to be able to identify chained builds for
improved accuracy of the new test identification for the FLake
Endorser project.

Bug:1204163
Change-Id: Ic60c733540a9afd7ff159408b0ea9ad7aac078e2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2928016
Commit-Queue: Marco Georgaklis <mgeorgaklis@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
4 years ago
LaMont Jones 9eed4238d8 gerrit: add createchange changeedit publishchangeedit
Add calls to support creating changes, as well as editing and publishing
them in gerrit_client and gerrit_util.

Bug=b:182613582

Change-Id: I0514cf08dce63ab29d99d4485d96fa124006326a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2800811
Auto-Submit: LaMont Jones <lamontjones@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: LaMont Jones <lamontjones@chromium.org>
4 years ago
Josip Sokcevic c99efb2f8c Add gerrit_client unit tests
Change-Id: Id4ca28da6c38f6403636ef8c4de5dae1206cb499
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2106518
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
5 years ago