173 Commits

Author SHA1 Message Date
Fabian Vogt
9e91713a35 Fix --osc-debug option with new osc
It only accepts bools now.
2023-12-12 16:01:52 +01:00
a4f7240361
Fix review_mode being set from a str and not from the enum 2023-07-11 10:30:35 +02:00
1003e6df14
Raise a concrete exception type, not the generic exception base class 2023-06-29 11:27:24 +02:00
510d91c681
ReviewBot: convert REVIEW_CHOICES into an enum 2023-06-29 11:27:24 +02:00
e842fd26b1
Add some type hints 2023-06-29 11:27:23 +02:00
1e09f93990
Add type hints to action_ methods of ReviewBot 2023-06-22 17:48:18 +02:00
Fabian Vogt
014387e9a5 Port over more uses of Request.get_creator() 2023-01-31 12:34:10 +01:00
Stephan Kulow
a80184d44e Add ReviewBot to check for bugowner lines in requests for new packages 2022-03-10 10:41:04 +01:00
Stephan Kulow
d6fb5d680c Remove sentry integration
It was introduced by #2159 because the various machines were hard to
monitor. Since we moved to botmaster there is no longer a problem with
that and if it ever served us is hard to say as the sentry project's
password is lost for years. So simplify the exception handling by just
throwing it
2022-02-21 14:41:33 +01:00
Stephan Kulow
aaab4af930 Target F401 - Unused imports 2022-02-18 18:29:27 +01:00
Stephan Kulow
f86579642b Target E501 - Line too long
https://www.flake8rules.com/rules/E501.html - but 79 characters is a
joke
2022-02-18 18:17:27 +01:00
Stephan Kulow
f38bd3a7ed Target E128 - Continuation line under-indented for visual indent
https://www.flake8rules.com/rules/E128.html
2022-02-18 17:35:33 +01:00
Stephan Kulow
27c364b0c9 Target E251 - Unexpected spaces around keyword
https://www.flake8rules.com/rules/E251.html
2022-02-18 17:28:13 +01:00
Stephan Kulow
d8f5d0874e Remove E201 - Whitespace after '('
https://www.flake8rules.com/rules/E201.html
2022-02-18 17:23:19 +01:00
Stephan Kulow
54079e949f Target E202 - Whitespace before ')'
https://www.flake8rules.com/rules/E202.html
2022-02-18 17:18:29 +01:00
Stephan Kulow
529d1dafae Target E302 - add two comment lines before class 2022-02-18 17:15:48 +01:00
Stephan Kulow
579145b52c Target F841 - Remove unused variables 2022-02-18 17:01:38 +01:00
Stephan Kulow
a8623bb8d8 Handle E712 - don't compare with == to Booleans 2022-02-18 16:34:58 +01:00
Stephan Kulow
1383ae9725 Targetting E126 - Continuation line over-indented for hanging indent
https://www.flake8rules.com/rules/E126.html
2022-02-18 16:02:08 +01:00
Stephan Kulow
d6628beadf Target E125 - Continuation line with same indent
https://www.flake8rules.com/rules/E125.html
2022-02-18 15:52:53 +01:00
Stephan Kulow
2023ccbe6e Target E124 - Closing bracket does not match visual indentation
https://www.flake8rules.com/rules/E124.html
2022-02-18 15:52:47 +01:00
Stephan Kulow
66a0f152ff Target E129 - Visually indented line with same indent
https://www.flake8rules.com/rules/E129.html
2022-02-18 15:52:47 +01:00
Stephan Kulow
5df665ccc5 Targeting E123 - Closing bracket does not match indentation
https://www.flake8rules.com/rules/E123.html
2022-02-18 15:52:47 +01:00
Stephan Kulow
e52dc6ce2b Harmonize imports on using lxml for XML parsing 2022-02-18 11:16:01 +01:00
Stephan Kulow
a8f7146baf Remove E713 offense from flaker 2021-09-21 14:20:08 +02:00
Ludwig Nussel
60e5fd94a2 abi-checker: recognize staging 2019-12-19 14:13:48 +01:00
ad06348dcf More flake8 cleanups 2019-12-10 12:50:57 +01:00
ea3b07568c Fix E203
This fixes incorrect whitespacing inside dictionaries.
2019-12-10 08:54:32 +01:00
ec88760187 Fix Flake E241
One more step towards white space sanity. Next group is E20x.
2019-12-10 08:46:02 +01:00
32ad0adc2d Fix all E22x errors
This cleans up white spaces around various kinds of operators to be
consistent.
2019-11-27 11:08:06 +01:00
Jimmy Berry
a3761c62e5 ReviewBot: include request description in search for comment commands. 2019-11-04 13:22:38 -06:00
Jimmy Berry
701021070c ReviewBot: rework override check to operate on actions.
In multi-action workflows the override check should be performed by
action so that different groups of users can override for different
actions. Additionally, abstracting the request_commands() method provides
a flexible base for additional commands to be added by ReviewBots.
2019-11-04 13:22:38 -06:00
Jimmy Berry
7033044469 ReviewBot: provide request_age_wait().
Provides configurable default, config key, and config override value.
2019-09-25 14:17:21 -05:00
Jimmy Berry
0930b8368e ReviewBot: add_review(): handle 403 as expected when superseded/rovoked. 2019-09-18 20:03:41 -05:00
Jimmy Berry
43067cf8e4 ReviewBot: _set_review(): handle review being revoked or superseded.
This can occur when the review state is changed during the review.
2019-09-18 18:22:56 -05:00
Jimmy Berry
14971e2db0
Merge pull request #2174 from jberry-suse/sentry-improvements
sentry improvements and check_source logger error demotion
2019-08-28 15:34:02 -05:00
Jimmy Berry
208336ca80 ReviewBot: action_method(): drop request.type sentry extra in favor or action.key. 2019-08-27 14:45:29 -05:00
Jimmy Berry
4ca9995b5d ReviewBot: simplify sentry_sdk initialization line since defined globally. 2019-08-27 14:44:54 -05:00
Jimmy Berry
b0d7e9930a ReviewBot: provide request.id and action.key as sentry extras. 2019-08-27 14:44:42 -05:00
Jimmy Berry
ca4033e614 ReviewBot: action_method(): reduce sentry extra to filter(None, ...). 2019-08-27 14:31:00 -05:00
Jimmy Berry
12d15ae850 ReviewBot: reduce unhandled request type log message from error to info.
Uninteresting request action types are intentionally left to the default
handler and does not constitute and error.
2019-08-27 08:20:13 -05:00
Jimmy Berry
5dd0a99068 ReviewBot: provide sentry_sdk integration. 2019-08-16 16:01:55 -05:00
Jimmy Berry
cd6b2b3c33 ReviewBot: nest review messages by action key when multiple actions.
Not only does this expose previously hidden messages on multi-action
requests, but also provides clarity as to which action triggered a
specific response. Since the keys are generated in a standard way and
the data formatted as YAML it can also be retrieved.
2019-07-16 10:27:37 -05:00
Jimmy Berry
a8ff27b81f osclib/core: provide action_is_patchinfo() from ReviewBot.
Allows for usage outside of ReviewBot children.
2019-07-11 16:01:42 -05:00
Stephan Kulow
011c80cc2a Remove debug output left in ReviewBot 2019-05-27 18:49:20 +02:00
Stephan Kulow
fe38a6127d Exit with an error if there were exceptions caught
Fixes #2041
2019-05-27 13:35:59 +02:00
Stephan Kulow
606e498554 ReviewBot: Simplify the !interval case
We only want to run the workfunc() and that's it
2019-05-27 11:03:04 +02:00
Stephan Kulow
3f3bbb3e10 Run even more bots in python3 2019-05-16 06:59:25 +02:00
Stephan Kulow
595e84191e More porting to python3
Travis changed default python to 3.6, which has impact on the way
flake8 checks. So make sure we run fine under flake8 of python 3
2019-04-20 21:16:50 +02:00
Jimmy Berry
d0e0f2aa3a ReviewBot: handle any exception raised by check_one_request().
Prevents a single failure from stopping all reviews.
2019-03-29 14:31:44 -05:00