summaryrefslogtreecommitdiff
path: root/git-hooks
Commit message (Collapse)AuthorAgeFilesLines
...
* Switch from patience diff to minimal diffEdward Welbourne2019-09-231-1/+3
| | | | | | | | | | | | | | | | | I find that a pure indentation change (making all the doc comments in qcalendar.cpp use the same indent, without reflowing after) gets complained at for mixing space-changes with non-space-changes. This arises because the "patience diff" algorithm we've been using makes some less than ideal choices. The minimal diff algorithm fares better on such a change - and sounds like it has a decent chance of being good on whatever cases prompted (the bogus and unnatural diffs that lead to) commit 6dac9c54dc0b72643629da2442bbe7c4526d7ae4, which this amends. Change-Id: I3b7efc03dbd8ec388ebc38458b25552f4ec426d6 Reviewed-by: Sergio Ahumada <sahumada@texla.cl> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Add clang-format-pre-commit hookFrederik Gladhorn2019-09-191-0/+29
| | | | | Change-Id: Iafa2ce4ca485122e44e5b143af68823793dd4b85 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Mark 5.12 as an LTS branchKari Oikarinen2019-09-021-1/+1
| | | | | | Change-Id: Ic784af0bc3b01d66116e5aa42af0772bbe51fb62 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* gerrit-bot: Fix syntax problem due to too much arcane punctuationEdward Welbourne2019-08-071-1/+2
| | | | | | | | | | | | We now check for the existence of the comment section in a slightly more readable way and then proceed based on that. Done-with: Orgad Shaneh <orgad.shaneh@audiocodes.com> Fixes: QTQAINFRA-2988 Change-Id: I90ddef66b97fea42bd9723a234235820bb21875a Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Avoid warning on taking length of undefined listEdward Welbourne2019-07-311-1/+1
| | | | | | | | Add missing dereference. Fixes: QTQAINFRA-2988 Change-Id: Ic20cb633cef19a40820d9f3585ffa3886416442f Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* QDoc bot: Add "autogenerated" tagOrgad Shaneh2019-07-191-1/+2
| | | | | | | | Useful for filtering out bot messages. Change-Id: I26d23b159ec006185c9fb817155742722f4095fa Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* SanityBot: Add "autogenerated" tagOrgad Shaneh2019-07-161-0/+1
| | | | | | | Enables filtering of bot messages Change-Id: I2060a6868fa703e009277a19d91c65de14d5ce11 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* gerrit-bot: Give the project when adding reviewers to a changeKari Oikarinen2019-06-111-1/+1
| | | | | | | | | | | Work around an issue where set-reviewers call causes an internal server error due to a NullPointerException. Giving the project explicitly avoids that error. Task-number: QTQAINFRA-3035 Change-Id: I466a85eb4bf7a7a14a5054e3436b16159e75f4c1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Gerrit Bot: Message that moving changes is done using the UIFrederik Gladhorn2019-05-271-32/+1
| | | | | | | | After the Gerrit upgrade, the bot doesn't work any more (we use NoteDB now) and the functionality is in the regular UI. Change-Id: I005b2501d63d6a99c9f643fd77a6451e5c6cfb06 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Avoid warning on taking length of undefined listEdward Welbourne2019-05-071-1/+1
| | | | | | | | | | | | | | | Recently added check for fatuous sanity review tested for empty comments with int($$verdict{comments}) == 0 but it's possible that $$verdict{comments} is undefined; when it is, we get a warning here: Use of uninitialized value in int at /srv/gerrit/sanitybot/gerrit-bot.pl line 224. So add and tweak some punctuation to make perl happy again. Thanks to Ossi for the appropriate runes. Change-Id: I211baa2e61cda98fc61ec97775f5a247da00c1f4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Fix sanity bot startup - Bare NONE is not allowedFrederik Gladhorn2019-05-031-1/+1
| | | | | | | | | After the last change, the bot refuses to start: Execution of /srv/gerrit/sanitybot/gerrit-bot.pl aborted due to compilation errors. Bareword "NONE" not allowed while "strict subs" in use at /srv/gerrit/sanitybot/gerrit-bot.pl line 224. Change-Id: I62958d97ba0311986549c7cc6e78a4e381cbd28a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Suppress notification when there's nothing but a +1 from the sanity botEdward Welbourne2019-05-021-0/+4
| | | | | | | Fixes: QTBI-1549 Change-Id: I061eafd8ab5b27d07dd9165e82688fd8cbcbe78d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Permit the use of MAC/mac again in commit messages/contentSimon Hausmann2019-03-151-1/+1
| | | | | | | | | | | | | Once in a while somebody runs into the bot complaining about the use of "MAC" when it's perfectly fine. For example in the context of "MAC address". This is quite annoying and less helpful than perhaps intended. So this change removes the trigger-happy part of the check but keeps the more clearly defined potential uses of old terminology from Apple. Fixes: QTQAINFRA-2800 Change-Id: If6b9cfbd0a808b424ffc93728fcc66939f5ad6ee Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Don't check spacing in test-dataEdward Welbourne2018-10-311-0/+2
| | | | | | | | | | | | | | | We have a general convention of storing test data in testdata/ sub-directories alongside their tests. This data is whatever it needs to be, for whatever the test may be doing, so we don't want to waste cycles commenting on its spacing, or spam reviewers with the results. Adding this exception might even encourage those maintaining tests with such data to adopt this (already common) convention and make it easier for others who encounter tests to know where to find their data. (I'll start with testlib's selftest's expected_* data when I can find the time.) Change-Id: Ib27b75e858e0573a65540787f4ccae6b2383bc3d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Add Fixes: tag to sanity botFrederik Gladhorn2018-09-041-1/+4
| | | | | | | Change-Id: I80b9e149675a13810cfa1164d97b1902d1ceb792 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add Fixes in gerrit_commit_msg_hookFrederik Gladhorn2018-08-311-1/+1
| | | | | | | This ensures the footers look nice. Change-Id: Ie8c61dbf39ceaccdc47e69764385ea252ab961af Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* sanitizer: slightly refactor initialization of $eof_checkOswald Buddenhagen2018-08-211-5/+4
| | | | | | | ... so it's more consistent with the other flags. Change-Id: Ic2eae23ed10594f7adab7f5980852294252923d9 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* sanitizer: exclude 3rdparty from eol-at-eof checkOswald Buddenhagen2018-08-211-1/+1
| | | | | | | | the eof is part of the content (and not just a git attribute, like the eol style), so it makes no sense to enforce our style for 3rdparty. Change-Id: I6cdfd4f3bf14ddab9e6cb2531547b97f5b96cbc8 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* 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>
* sanitize-commit: recognize cross-repo cherry-picksOswald Buddenhagen2018-03-191-3/+5
| | | | | | | | we don't validate them, though, as we have no access to the source repository. Change-Id: I8eea89506aca007cb2413d24632904ab81119cae Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* 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>
* declare 5.9 a cherry-pick branchOswald Buddenhagen2018-02-121-1/+1
| | | | | Change-Id: Ibd1c42ab4bbe2592b3f9116546f0e5342180d139 Reviewed-by: Lars Knoll <lars.knoll@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>
* sanitizer: add support for multiple cherry-pick branchesOswald Buddenhagen2018-01-101-22/+40
| | | | | Change-Id: I12e152f10cbd0fca8950854d41847d6de8225159 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* gerrit-bot: Validate change status on moveOrgad Shaneh2018-01-091-3/+6
| | | | | Change-Id: Ideca76f81632a4d886193b8a8529aa9682b84066 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* sanitizer: recognize nobiliary particle 'du' in realname checkOswald Buddenhagen2018-01-081-1/+1
| | | | | | | Task-number: QTQAINFRA-1672 Change-Id: I4bc20293b566dd02ac8ece3a55e2364df53a4baa Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Match "new mode" as well as "new file mode" in permissions checkEdward Welbourne2018-01-081-1/+1
| | | | | | | | | | | The permissions check was only looking at "new file mode", which is only present for new files. For existing files, when they change mode, the line says "new mode" instead. So match that, too. This catches what qtbase/ffc8409aa58c04c1dd140001976b55925ac959f6 did wrong. Change-Id: I07b30c1b88c067c3f90888ff3b212b15a9384134 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>
* Teach sanity-bot to ignore Lorem ipsumEdward Welbourne2017-10-161-0/+4
| | | | | | | | It triggers on some of the testlib selftests, to my repeated irritation. Change-Id: I220ef37b5579abe201a35ff186a07c4da4bf89cf Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Change the permission-check to use a short whitelistEdward Welbourne2017-10-131-5/+5
| | | | | | | | | | | Rather than adding .txt and .ttf (recently witnessed) to the list of suffixes on files that shouldn't be executable, rearrange the test to actively recognize files that should be executable, complaining if any others are executable. In the process, remove .pm from the executable script list; #!/usr/bin/perl doesn't make sense in a .pm, only in .pl Change-Id: I9b0de48443d04f930677ae8f64959ed26343fa35 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* sanitizer: accept aNy cASe in remainder of first word of footersOswald Buddenhagen2017-08-221-1/+1
| | | | | | | | | otherwise we complain about "LLVM-bug", which is not helpful. this also removes the now-obsolete GPush special case. Change-Id: I22bb22cd29e152dce9d21a1bb7e7aece837266f7 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Accept lower case "la" as part of a real nameAndre de la Rocha2017-08-161-1/+1
| | | | | | | | Changes the sanity script to accept "la", which is common in Spanish names. Change-Id: I90bbd0da74631d27e73d9ed9e35f6fc5252ba1aa Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* fix copyright checkJesus Fernandez2017-08-081-2/+2
| | | | | | | | The variable $no_copyright was getting an incorrect value due to a typo in the regular expression. Change-Id: Ia99bb32f0c9c2bba3fff50662059ff03ab6cf556 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* make the size complaint less confusing for files right above the limitOswald Buddenhagen2017-06-281-2/+2
| | | | | | | | | "50KiB > 50KiB" is mathematically wrong, and is an artifact of the first number being rounded down. so instead complain about >= 50KiB. Change-Id: Idebaebcd7e1b432ea37dc2b0c9ed6d0705b47c92 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* permit tabs in qt 3d studio filesOswald Buddenhagen2017-06-141-1/+1
| | | | | Change-Id: Ic85f5fced6c6587f48c6f54512bf681543f887ab Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* rewrite watch handlingOswald Buddenhagen2017-06-121-20/+12
| | | | | | | | | | fundamentally change how the data is queried from git. this has some marginal unnecessary cost for the case where no applicable watches are actually present, but the code is clearer this way. Change-Id: I0a89401a9f199b69da7471ca551178f5d89b8a4f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* separate fixup check from w-i-p checkOswald Buddenhagen2017-06-121-1/+4
| | | | | | | | it doesn't really make sense to claim wip for a neglected squash. Change-Id: I30245ff57142bebbdd2e29ff4160ccb7c427392e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* factor out watches and w-i-p handling to separate workerOswald Buddenhagen2017-06-122-85/+173
| | | | | | | | | | | | | 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>
* don't complain about missing copyright headers in 3rdparty codeOswald Buddenhagen2017-04-271-1/+1
| | | | | | | | | it's pointless. Change-Id: I7f9eec32134ba2793ec8015ebccce6cea33867ec Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Teach sanitize-commit not to grumble about tabs in *.mk filesEdward Welbourne2017-04-271-1/+2
| | | | | | | | | | The suffix .mk is commonly used for non-primary make-files (such as are invoked with make -f or pulled in by make's include directive). Complaining about leading tabs in Makefile is already avoided, so do the same for *.mk files. Change-Id: Iceff9f65ccdcc716babb8c738dd1d6141e08ea2a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* support prefixes in summary mood detectorOswald Buddenhagen2017-03-201-1/+1
| | | | | Change-Id: I91bc2e7d7b89a9036ad962d89b72a5fabb47c6f1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* move assignment of Sanity-Review JSON field to sanitize-commitOswald Buddenhagen2017-02-222-9/+7
| | | | | | | | | | 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-222-70/+39
| | | | | | | | 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>
* don't tab-check svg filesOswald Buddenhagen2017-02-131-1/+1
| | | | | | | | | adobe illustrator's export function creates tabs, and it would be unreasonable to clean that up. Change-Id: I94555a7f2e2f6c9b153a8d5f5395b8972f410e88 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* add validation of cherry-picksOswald Buddenhagen2017-02-031-1/+88
| | | | | | | Task-number: QTBUG-55945 Started-by: Edward Welbourne <edward.welbourne@qt.io> Change-Id: Ifd2fd9dde62606ec67076e69bd24ec5a5be1c9e9 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Teach sanity bot to warn about mood in commit subjectTor Arne Vestbø2017-02-011-0/+4
| | | | | | | Commit subjects should be written in the imperative, present tense. Change-Id: I99f1864af18c546704011d24aeeae05d8f2b7631 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Fix glitch in detection of misguided executable permissionsEdward Welbourne2016-11-211-1/+1
| | | | | | | | | Sanity-bot regards *.pl as C-like code; unlike the other kinds of file it regards as C-like, perl scripts are sensible things to make executable. So make an exception for them. Change-Id: Ibbfea2149a3b735baac4424af51b55bcb5bca090 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>