summaryrefslogtreecommitdiffstats
path: root/scripts/jira
Commit message (Collapse)AuthorAgeFilesLines
* Add install dev dependencies to MakefileFrederik Gladhorn2019-07-261-0/+3
| | | | | Change-Id: Iba8db482d275efc3bcb120391b94abbe4b3db247 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Cleanup jira gerrit botFrederik Gladhorn2019-07-2614-102/+146
| | | | | | | | | Move Version out, rename Change to ChangeRange which makes it a bit clearer. Rename the function to get a logger to get_logger so that it doesn't have the same name as the module itself. Change-Id: I0f9f9b07a64b2f76cedc369525de5f1ec9941a1e Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Add type ignore hints for newer mypyFrederik Gladhorn2019-07-264-6/+6
| | | | | | | 3rd party packages often lack type information. Change-Id: Iac427eada2354537124767c48d720fa5776da8e9 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Make flake8 happyFrederik Gladhorn2019-07-261-2/+2
| | | | | Change-Id: Ie06f79b842254e8bf39cebd4f6da33dfd5c06909 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Do not hard-code python 3.6Frederik Gladhorn2019-07-262-289/+303
| | | | | | | Also update the dependencies. Change-Id: Ibfb1f7e4bf867dc8d29567677ce02f077957d6c6 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Teach jira-gerrit-bot about replication eventsFrederik Gladhorn2019-06-271-0/+2
| | | | | | | | | | | | We can safely ignore these, but it's nice to explicitly handle all types of events, especially if someone wants to later use this code for other purposes. These events are new since the Gerrit upgrade. Change-Id: I8b411a4cf55fb0775eba917bff4fdd4458162fb7 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Daniel Smith <Daniel.Smith@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Simplify jira bot: we now always get an event instanceFrederik Gladhorn2019-06-272-5/+3
| | | | | | | Change-Id: Ifbbad62d0068e6955fe547c1bbf8a1e895a0b140 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Daniel Smith <Daniel.Smith@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Stop running the bot on random eventsFrederik Gladhorn2019-06-273-20/+44
| | | | | | | | | | | | We upgraded gerrit, the new gerrit version sends more ref-updated events. Filter those out. We eventually ran out of file descriptors, because each comment added on Gerrit would lead to fetching the corresponding repo around eight times, which is completely unneeded. Change-Id: I195a3c16f838ba5fb872e6bfb79640a99628315d Fixes: QTQAINFRA-2884 Reviewed-by: Daniel Smith <Daniel.Smith@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Use full path to pipenv in MakefileFrederik Gladhorn2019-04-081-1/+1
| | | | | | | | When deploying automatically and using systemd to run, we have a clean environment, which means pipenv cannot be found. Change-Id: Iff44fe50fe8f55255736586bc5fe5a827fac1036 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Do not add comment about not closing issue when the issue is closedFrederik Gladhorn2019-04-081-5/+6
| | | | | | | | | | Simplify the code that closes issues and make sure it updates the fields. Before the bot would unconditionally add "A change related to this issue was integrated. This issue was re-opened before, the bot will not close this issue, please close it manually when applicable." Change-Id: Ic8e3840a6341cccb0bef0136c6e03a01ce9e5ece Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Add missing return type annotationFrederik Gladhorn2019-04-081-1/+1
| | | | | Change-Id: I6bd9add27907955f6033e1202a495526f203d38c Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Use a clone of the full repo to run on productionFrederik Gladhorn2019-04-051-1/+1
| | | | | | | | | Originally the bot lived in a repo of its own. Now it's in qtqa and to make automatic deployment and updating easy, use the full path in systemd. Change-Id: I8ef7cc8b82f63d19ac39fc3a156ce97a4d0c0c0a Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* Add Makefile for the JIRA-Gerrit botFrederik Gladhorn2019-04-051-0/+28
| | | | | | | | The top-level .gitignore ignores makefiles, therefore this was not included in the first commit. Change-Id: I41bd3a899bf1754d3003dcaebbb78334799e530f Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix gerrit bot closing issues that were manually re-openedFrederik Gladhorn2019-04-032-9/+26
| | | | | | | | | Instead of closing the issue again, post a comment. Change-Id: I76d3c531abbad2fa97912925af3630cf866bcf8c Fixes: QTQAINFRA-2847 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* Simplify test setupFrederik Gladhorn2019-04-031-10/+2
| | | | | | Change-Id: Ie7d2bf38f2cb077c5cff183b341c059b067cee46 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* Improve branch handling in testFrederik Gladhorn2019-04-031-33/+36
| | | | | | | | | The tests need to resolve dev to a version number. This still needs to dynamically figure out the next major version... But at least it's a baby step forward. Change-Id: I8ac433e57ba4a77315d316891a68dd260514b746 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Make sure to have a copy of tqtc-qt5 to be able to pass all testsFrederik Gladhorn2019-04-031-0/+2
| | | | | | Change-Id: If1cc0a91101f65c881eb9a785440c2e949883142 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* Use f-strings to improve readabilityFrederik Gladhorn2019-04-011-2/+2
| | | | | | Change-Id: Ia826a6b7eb54b8f84ba3a3071c27fcb4afe2d9d9 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* Clean up directory operations to be more cross-platformFrederik Gladhorn2019-04-012-2/+2
| | | | | Change-Id: I5e0e59629299225fb769bd213f74565d874db107 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* Improve readmeFrederik Gladhorn2019-04-011-3/+3
| | | | | Change-Id: I74370b90cf13cee12bf5581472a69151b1b21966 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* Make __init__.py files more consistentFrederik Gladhorn2019-04-011-1/+5
| | | | | | | Other files are split into several lines, follow in this one. Change-Id: I97efda35a0296d8b47b36e590b7a053467865264 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* Add comment and __main__ check to helper scriptFrederik Gladhorn2019-04-011-8/+12
| | | | | Change-Id: I8d0b6a3bf166c20201128f8f7acfc11ac3be8e74 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* JIRA-Gerrit-Bot: ignore E266Frederik Gladhorn2019-04-011-2/+2
| | | | | | | The check otherwise complains about all of our copyright lines. Change-Id: I2d924a8e9c73a0be7da1ffe3d595ff3c04d70e33 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* Initial version of the JIRA-Gerrit botFrederik Gladhorn2019-03-2931-0/+2826
This bot listens to Gerrit ssh events and closes JIRA issues when the commit message contains a Fixes: QTBUG-### line. Change-Id: I6d68b69e624143e2aae84ad0b172583d3855703d Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>