gerrit

Gerrit set-review api doesn't work

倖福魔咒の 提交于 2019-12-11 16:11:09
问题 I tried to add review comments by using this "set-review" api: https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#set-review I can get a json response from this interface, but nothing is changed. I can't see any new comments from Gerrit web page. Here is the example of my client side code: url = '/changes/16148/revisions/1/review' data = json.dumps({ 'message': 'test', 'labels': {}, 'comments': { 'tools/docpreview.py': [{ 'line': 20, 'message': 'hehe', }], }, 'notify':

Gerrit time search operators is not working when specify to second

安稳与你 提交于 2019-12-11 15:19:58
问题 If i'm using /changes/?q=status:merged+after:2018-08-25 it can return the result, however if using /changes/?q=status:merged+after:2018-08-25 00:00:00 it returns [] According to document, it is able to search time like this. [[after_since]] after:'TIME'/since:'TIME':: + Changes modified after the given 'TIME', inclusive. Must be in the format `2006-01-02[ 15:04:05[.890][ -0700]]`; omitting the time defaults to 00:00:00 and omitting the timezone defaults to UTC. How to query when specify time

Bypass rule for administration group in rules.pl in gerrit configuration

流过昼夜 提交于 2019-12-11 15:09:28
问题 I'm not familiar with prolog language. I've used the example number 8 of the prolog cookbook. https://gerrit-review.googlesource.com/Documentation/prolog-cookbook.html#_example_8_make_change_submittable_only_if_tt_code_review_2_tt_is_given_by_a_non_author Which code is : submit_filter(In,Out) :- In =.. [submit | Ls], add_non_author_approval(Ls, R), Out =.. [submit | R]. add_non_author_approval(S1, S2) :- gerrit:commit_author(A), gerrit:commit_label(label('Code-Review', 2), R), R \= A, !, S2 =

Gerrit clone using http behind a apache2

百般思念 提交于 2019-12-11 15:04:02
问题 we have Gerrit installed to manage our repositories on the server. So far, everything works well, we can clone using ssh. Gerrit is the version 2.14.2 apache 2.4.18. That is our configuration files (censored when needed): /media/data/gerrit/etc/gerrit.config [gerrit] basePath = git serverId = ed5a7ef7-289e-4590-9292-cbdede1b0dc9 canonicalWebUrl = http://repository.something.com/gerrit [database] type = h2 database = /media/data/gerrit/db/ReviewDB [index] type = LUCENE [auth] type = HTTP

Is it possible to run a pre-receive style hooks in Gerrit?

こ雲淡風輕ζ 提交于 2019-12-11 14:31:52
问题 We are planning to have some policies that will ensure we don't accept commits that won't adhere to commit message policy. This policy is specific to a repo. Is it possible to run pre-receive style hooks in Gerrit where we can run these policies before the patch gets created? 回答1: Yes, Gerrit has its own hook mechanism included via the hooks plugin so it's possible to block the push if some policy is not valid. Consider also to use the Git::Hooks. We use it and it's really good. Using Git:

Jenkins: Gerrit & Git plugin - missing refspec field?

隐身守侯 提交于 2019-12-11 14:22:02
问题 I am trying to set up a Jenkins job (actually it's a MultiJob, but I don't think this is relevant at this point), with a Gerrit trigger. The documentation for the Gerrit Trigger with the Git Plugin gives instructions for the correct refspecs, choosing strategy and branch. However, in my job setup, I do not have settings for the refspec and choosing strategy, and the options are not the same as those shown in the Gerrit trigger docs. This is what I have: Do I have the wrong version of a plugin

Gerrit with tracked feature branches?

假装没事ソ 提交于 2019-12-11 13:30:46
问题 We (git/gerrit newbs) are trying to use gerrit with feature branches. The workflow we are trying to implement is as follows: User creates a feature branch, pushes it to the remote repo directly (no review) with git push -u origin users-branch . As changes pile up in the master branch, user does git pull --rebase origin master ( --rebase is needed because otherwise git creates a merge commit, and merge commits cannot be pushed through gerrit). User continues to push his changes to the remote

Gerrit push the same changesets to both master and a branch

夙愿已清 提交于 2019-12-11 11:34:15
问题 Working on a feature branch in Gerrit, I want to push my feature branch changes to master (so others can make use of it) as well as to my feature branch (so I can keep working on it without the changes on master), but once I've pushed to one, I can't gerrit push to the other. For example, if I git push HEAD:refs/for/master then a subsequent git push HEAD:refs/for/feature will result in: Total 0 (delta 0), reused 0 (delta 0) remote: Processing changes: refs: 1, done To ssh://gerrit.server/repo

Pull a commit from a Gerrit repository using its commit ID only

不羁的心 提交于 2019-12-11 09:34:16
问题 Let's assume I have the SHA1 of a commit that's under code review in Gerrit, but not its reference (refs/changes/...) The question is: how to fetch it from my local repository? There is a similar question yet Gerrit-unrelated question here: Retrieve specific commit from a remote Git repository The answer doesn't seem to work with Gerrit: git fetch origin 67b4b77655d65004cc908aaf7e65b24bcaa81fd8:refs/remotes/origin/foo fatal: Couldn't find remote ref 67b4b77655d65004cc908aaf7e65b24bcaa81fd8 I

i like to add the AOSP 4.3 to a gerrit project

妖精的绣舞 提交于 2019-12-11 08:53:07
问题 "i am pretty new to this stuff so kindly bear with me" i have downloaded AOSP4.2.1 to my ~/Android_setup/AOSP4.2.1 using below steps and was able to compile and build the images. << repo init -u https://android.googlesource.com/platform/manifest -b android-4.2.1_r1 repo sync >> and now want to setup a Gerrit server on my PC, and create a new project with the AOSP code, i was able to setup a local gerrit server in my ~/gerrit_example folder. i was able to create new proejct in gerrit using the