Simple interface:
- comment_handler_add(): Add handler to start recording log messages
for comment.
- comment_write(): Write comment from log messages if not similar to
previous comment.
See leaper.py for example usage.
In the process of porting many improvements and bug fixes were added. Usage
follows the standard ReviewBot format and allows for new execution styles,
but the following examples replicate previous usage.
# Review all requests assigned to factory-auto.
./check_source.py --group factory-auto review
# Review request 13370.
./check_source.py --group factory-auto id 13370
# --project translates to project command.
# No longer automatically includes $project:NonFree.
./check_source.py --group factory-auto project openSUSE:Factory
New options available are:
--ignore-devel ignore devel projects for target package
--devel-whitelist=FILE file containing whitelisted projects (one per line)
--review-team=GROUP review team group added to requests with > 8 diff
--repo-checker=USER repo checker user added after accepted review
Note that --ignore-devel used to be provided as env[IGNORE_DEVEL_PROJECTS].
Some highlights about what was cleaned up:
- cryptic variable names replaced
- replaced custom osc queries with osc.core calls where applicable
- removed the need to load package information for all packages within
target project which cuts runtime in half for single review
- removed extraneous code that performed extra steps for no reason
os.path.dirname(os.path.realpath(__file__.replace('.pyc', '.py')))
os.path.dirname(os.path.realpath(__file__))
and _checker_prepare_dir() which needlessly chdir() twice.
- one logic branch failed to cleanup checkout directory
- new flags provide additional flexibility
Just use the generated build number while fetching openqa jobs. This way
we can trigger test runs even if there are no incidents to review to
verify the tests still work on maintained products
The new parameter --review-mode allows to specify how the review bot should handle obs reviews
normal: accept review if check is good, decline if bad
no: don't accept or decline requests
accept: always accept review, even if check fails
fallback-onfail: accept review and set other user or group as review if check fails
fallback-always: always accept review and set other user or group as reviewer afterwards
if a review for the maintbot user is added for a second time the old
function would only see the 'accepted' state of the first review and
the bot would not change the review state.
factory-source checks if submissions contain sources already accepted in
Factory. maintbot makes sure maintenance submissions are authored by the
Factory package maintainer.
Both are based on a new generic ReviewBot.py class that can serve as
common framework for review bots.