summaryrefslogtreecommitdiffstats
path: root/git-hooks/gerrit-bot
Commit message (Collapse)AuthorAgeFilesLines
* accept dashes in branch names in move requestsOswald Buddenhagen2018-03-191-1/+1
| | | | | | Change-Id: If351a93f6959406e032e85c8e0238af87333a727 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Include the prior branch in gerrit-bot's "Moved" messageEdward Welbourne2018-02-271-1/+1
| | | | | | | | | | | Having now seen moves using the bot in practice, I find that reviews after a move typically give no hint to which branch they were on *before* the move. Though usually unimportant, it's sometimes of interest to a reviewer. Change-Id: I2462ca2033a7f9007ff5dc226dc6674b04b4e4fb Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* gerrit-bot: comment out status check in move command processingOswald Buddenhagen2018-01-121-3/+4
| | | | | | | | | | contrary to expectations, the 'status' field is simply missing from the event streams change object. we'll let the worker script complain about the problem instead. Change-Id: Ie7cc6af462372f52a1e942fec836c680f0f51dd2 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* gerrit-bot: support slashes in branch names in move requestsOswald Buddenhagen2018-01-121-1/+1
| | | | | Change-Id: Ifcace60957cf2383effaaa23adcd7e1509d04066 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* gerrit-bot: fix hash indexingOswald Buddenhagen2018-01-121-1/+1
| | | | | | | amends 21ec987901. Change-Id: I8d04359bbaa77096f7c8d4e446978c65cb2eea19 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* gerrit-bot: Validate change status on moveOrgad Shaneh2018-01-091-3/+6
| | | | | Change-Id: Ideca76f81632a4d886193b8a8529aa9682b84066 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Automatically move change upon requestOrgad Shaneh2018-01-081-0/+44
| | | | | | | | | | | | | | | | | Let the gerrit bot listen to comments and process move requests in the form: "bot: move to 4.5". This should replace the current method for moving a change, which is to ask ossi or fregl. Only the change owner is allowed to request moving the change. Resume is not needed because the bot is up most of the time, and unlike the Sanity-Review label, this can be easily retriggered by the user in case of failure. Change-Id: I5b89fb8e38b0e0af2b7a4f20a5b29412493fb72e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* factor out watches and w-i-p handling to separate workerOswald Buddenhagen2017-06-121-85/+65
| | | | | | | | | | | | | originally, the idea was to have one gerrit-bot instance per worker, but that would result in an (even greater) flood of comments. so all functionality that didn't fit into sanitize-commit was added to gerrit-bot. at this time it's getting messy, so clean it up by making it a plain launcher/dispatcher again, with the ability to run multiple workers on a single commit. Change-Id: I8c04f449726793b99e9f1ac5c6db330a1f17389f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* move assignment of Sanity-Review JSON field to sanitize-commitOswald Buddenhagen2017-02-221-8/+5
| | | | | | | | | | the worker knows gerrit's JSON format and the meaning of the field's values anyway, so putting the field name there as well actually improves locality. Change-Id: If1ee5a5e54bb041244dcc986b6236de504522c2f Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* prune non-REST gerrit code pathsOswald Buddenhagen2017-02-221-57/+27
| | | | | | | | we've been on gerrit 2.7 for long enough. Change-Id: I7ee344b724b103594c196fc394b9bdc7349ee36c Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* gerrit-bot: use separate account to invite reviewersOswald Buddenhagen2017-02-221-1/+5
| | | | | | | | | | notification mails from the sanity bot are suppressed for users not owning the change, so the invited reviewers would never get a proper invitation. Change-Id: I4bb816a3a5178cba01fe11016c46ae933807a454 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* tolerate non-json output in front of json content from workerOswald Buddenhagen2015-12-181-0/+3
| | | | | | | | this avoids that die if the worker emits any warnings or errors before the verdict. Change-Id: I7e5e6ec71983eb2352bf83e4a300c3a6e0a090c2 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* invite reviewers before posting reviewOswald Buddenhagen2015-10-231-8/+8
| | | | | | | | | it sort of makes sense that the persons actually see why they are being invited. Change-Id: Ie6cf006fc2e137d439924774ff0808cda8c42626 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
* make work-in-progress marker match even stricterOswald Buddenhagen2015-04-131-1/+1
| | | | | | | | | | | observed conventions: the marker is typically used at the beginning of the summary, optionally in square (or angle) brackets, optionally followed by a colon - all-lowercase, all-uppercase, or capitalized. alternatively, it's used somewhere else in the summary, but always in all-uppercase. Change-Id: I52b3eb2162f281450aebe6b770ba4639ed1557b2 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* move the work-in-progress detection to the bot itselfOswald Buddenhagen2015-02-131-2/+17
| | | | | | | | | | | | | | it obviously makes no sense when the sanitizer is executed locally. additionally, this allows us a different treatment of WIP reports: instead of giving a -2 sanity review, give a -2 code review. that way the change owner is not spammed by useless notifications (because the sanity review itself is positive, so the message is suppressed by the gerrit configuration). Change-Id: I10bc8f8f61673e75983dcb91310836d59c434483 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-2/+2
| | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: If3c8d221bcf8e5010048ed5f1c50cd35c04e7199 Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* move file watcher functionality from sanitizer to botOswald Buddenhagen2015-02-031-0/+50
| | | | | | | | | | | | watchers are really pointless when sanitizing local commits, especially as nobody actually has the relevant configuration. as an additional boon, the bot can now automatically invite relevant people. Change-Id: I735056845d7f807904070e61efb54407dcec9fb9 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* automatically invite maintainers when bot produces too much outputOswald Buddenhagen2015-02-021-0/+13
| | | | | | | | | conceivably, this mechanism could be used in more cases, for example on -2 reviews. however, this would need some additional tagging by the worker script - every WIP is a -2 ... Change-Id: Ib10777089926164b70dc3b7dd46c2fb526ecf165 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* move message quoting to a more logical placeOswald Buddenhagen2015-02-021-3/+5
| | | | | | | quote it right before building a command line. Change-Id: I5bd95dbe2fc392b974b730189277a62ae6ae59d5 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* add missing docu for 'excluded' optionOswald Buddenhagen2015-01-271-0/+3
| | | | | | Change-Id: I24fa6b68b66b66e0339fbd593b78f10d805d51f2 GPush-Base: a2b0d053d4200b816cb811338308fb47b3216ad4 Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* add support for using gerrit's REST api to sanity botOswald Buddenhagen2014-10-291-14/+52
| | | | | | Change-Id: Iac47b4480bf427c2524d79484dcf8a9fca22c5a2 Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* use git-fetch --pruneOswald Buddenhagen2014-10-291-1/+1
| | | | | | | | otherwise dead mainlines accumulate, as for example when we changed branching schemes. Change-Id: Ia5bcb90a079dc62c3c848d139cef5f6d6e0ccbba Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* nuke pointless intermediateOswald Buddenhagen2014-10-211-2/+4
| | | | | | | the pipe can be read in one swoop. Change-Id: I72f87996d26663d0203404e77d47e130046845b7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* also consider changes in DRAFT stateOswald Buddenhagen2014-06-241-1/+1
| | | | | Change-Id: I729dc9f37f604d7a7ed97ddb7395080b3afa3b3e Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
* add possibility to exclude only particular branchesOswald Buddenhagen2014-03-271-5/+6
| | | | | | Change-Id: Ifdeb8782bcc47730514eca1fb2f2a481c78484c7 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
* add possibility to completely exclude projects from sanity reviewOswald Buddenhagen2014-03-271-38/+46
| | | | | | Change-Id: I83d33248a0f9f17e2d44f841064e5280110c006b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* add multi-instance support to sanity botOswald Buddenhagen2013-03-261-3/+7
| | | | | | | allows specifying a group to get config data from. Change-Id: I80e8816e73d4690634fc558390cb3601a255f255 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* update copyright yearOswald Buddenhagen2013-02-111-1/+1
| | | | | Change-Id: I670423c6001e2a504df8be80b42ee88566ad3baa Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Change copyright info from Nokia to DigiaSergio Ahumada2012-11-281-2/+2
| | | | | Change-Id: I1cec04e8763c6102b485638058df37d9093ed859 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* put change refs into a more defined placeOswald Buddenhagen2012-06-081-7/+6
| | | | | | | don't mess with the remote ref string Change-Id: I30890801a40fc66049e96534ec69c7fe60032085 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* make fetching mainlines more efficientOswald Buddenhagen2012-06-081-9/+16
| | | | | | | | - don't re-fetch them unless gerrit tells us there was an update - fetch them together with the change ref Change-Id: Icf00564ad676cd1b30cd5ab6596df83520d3fa53 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* adjust license headers like in other scriptsOswald Buddenhagen2012-02-031-3/+1
| | | | | | Change-Id: I69bf891d90a5f1bffea2aee16c46e651207405e3 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* remove %Z from time formats - it's redundant with %cOswald Buddenhagen2012-02-021-4/+4
| | | | | | Change-Id: Idb8eb8fef7511e2bb28db9a22a43e527b5ced6b5 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Add missing license header.Oswald Buddenhagen2012-01-261-0/+9
| | | | | | Change-Id: I3c5f79e433631c250e6908a9617ee001cb10f65d Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* remove .pl file extension. there is no point in it being thereOswald Buddenhagen2012-01-261-0/+195
Change-Id: I67d240094ef78899dd37c71bc2991fefe71c530f Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>