{"action":"created","issue":{"url":"https://api.github.com/repos/openSUSE/osc-plugin-factory/issues/623","repository_url":"https://api.github.com/repos/openSUSE/osc-plugin-factory","labels_url":"https://api.github.com/repos/openSUSE/osc-plugin-factory/issues/623/labels{/name}","comments_url":"https://api.github.com/repos/openSUSE/osc-plugin-factory/issues/623/comments","events_url":"https://api.github.com/repos/openSUSE/osc-plugin-factory/issues/623/events","html_url":"https://github.com/openSUSE/osc-plugin-factory/pull/623","id":197961567,"number":623,"title":"Port osc-check_source.py to ReviewBot as check_source.py.","user":{"login":"jberry-suse","id":22943929,"avatar_url":"https://avatars.githubusercontent.com/u/22943929?v=3","gravatar_id":"","url":"https://api.github.com/users/jberry-suse","html_url":"https://github.com/jberry-suse","followers_url":"https://api.github.com/users/jberry-suse/followers","following_url":"https://api.github.com/users/jberry-suse/following{/other_user}","gists_url":"https://api.github.com/users/jberry-suse/gists{/gist_id}","starred_url":"https://api.github.com/users/jberry-suse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jberry-suse/subscriptions","organizations_url":"https://api.github.com/users/jberry-suse/orgs","repos_url":"https://api.github.com/users/jberry-suse/repos","events_url":"https://api.github.com/users/jberry-suse/events{/privacy}","received_events_url":"https://api.github.com/users/jberry-suse/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-12-29T06:43:10Z","updated_at":"2017-01-02T16:28:06Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/openSUSE/osc-plugin-factory/pulls/623","html_url":"https://github.com/openSUSE/osc-plugin-factory/pull/623","diff_url":"https://github.com/openSUSE/osc-plugin-factory/pull/623.diff","patch_url":"https://github.com/openSUSE/osc-plugin-factory/pull/623.patch"},"body":"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.\r\n\r\n```\r\n# Review all requests assigned to factory-auto.\r\n./check_source.py --group factory-auto review\r\n\r\n# Review request 13370.\r\n./check_source.py --group factory-auto id 13370\r\n\r\n# --project translates to project command.\r\n# No longer automatically includes $project:NonFree.\r\n./check_source.py --group factory-auto project openSUSE:Factory\r\n```\r\n\r\nNew options available are:\r\n\r\n```\r\n--ignore-devel          ignore devel projects for target package\r\n--devel-whitelist=FILE  file containing whitelisted projects (one per line)\r\n--review-team=GROUP     review team group added to requests with > 8 diff\r\n--repo-checker=USER     repo checker user added after accepted review\r\n```\r\n\r\nNote that `--ignore-devel` used to be provided as `env[IGNORE_DEVEL_PROJECTS]`.\r\n\r\nSome highlights about what was cleaned up:\r\n- cryptic variable names replaced\r\n- replaced custom osc queries with osc.core calls where applicable\r\n- removed the need to load package information for all packages within target project which cuts runtime in half for single review\r\n- removed extraneous code that performed extra steps for no reason\r\n  ```python\r\n  os.path.dirname(os.path.realpath(__file__.replace('.pyc', '.py')))\r\n  os.path.dirname(os.path.realpath(__file__))\r\n  ```\r\n  and `_checker_prepare_dir()` which needlessly `chdir()` twice.\r\n- one logic branch failed to cleanup checkout directory\r\n- new flags provide additional flexibility\r\n\r\nThe only items I am not certain about are:\r\n- `# Check in the srcmd5 is actually in Factory`\r\n  This would seem to be unnecessary if the bot is reviewing factory since it should be assumed the request is not in factory? I assumed the bot was used for openSUSE point release development which has been replaced by `leaper.py` and as such this would be unneeded. If this is not the case please explain.\r\n- fake_devel_prj submission\r\n  ```python\r\n  act = FakeAction(prj, pkg, tprj, tpkg, rev)\r\n  self.api.submit_to_prj(act, fake_devel_prj, force_enable_build=True)\r\n  ```\r\n  Not sure what this is about.\r\n- skip review functionality, is this needed?\r\n\r\nI did not have a `role_add` request to test on, but I tried on `delete` and `submit`. With the new options I would expect this to work for SLE pending #614. Also note this branch includes #622. Once accepted I'll rebase to be sure the merge is clean."},"comment":{"url":"https://api.github.com/repos/openSUSE/osc-plugin-factory/issues/comments/269993240","html_url":"https://github.com/openSUSE/osc-plugin-factory/pull/623#issuecomment-269993240","issue_url":"https://api.github.com/repos/openSUSE/osc-plugin-factory/issues/623","id":269993240,"user":{"login":"lnussel","id":722232,"avatar_url":"https://avatars.githubusercontent.com/u/722232?v=3","gravatar_id":"","url":"https://api.github.com/users/lnussel","html_url":"https://github.com/lnussel","followers_url":"https://api.github.com/users/lnussel/followers","following_url":"https://api.github.com/users/lnussel/following{/other_user}","gists_url":"https://api.github.com/users/lnussel/gists{/gist_id}","starred_url":"https://api.github.com/users/lnussel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lnussel/subscriptions","organizations_url":"https://api.github.com/users/lnussel/orgs","repos_url":"https://api.github.com/users/lnussel/repos","events_url":"https://api.github.com/users/lnussel/events{/privacy}","received_events_url":"https://api.github.com/users/lnussel/received_events","type":"User","site_admin":false},"created_at":"2017-01-02T16:28:06Z","updated_at":"2017-01-02T16:28:06Z","body":"The check whether sources are in Factory is an optimization here. So the bot doesn't download the sources again. The purpose of this check in leaper.py is to avoid double work for the review team. However, since this bot may also add the review team the interaction or code sharing with leaper.py would be a topic to investigate indeed.\r\n\r\nFakeAction is probably superfluous nowadays since we have adi stagings.\r\n\r\nThe skip feature is needed to make the bot add review-team and repochecker even if the source check is skipped."}}
{"actor":{"display_login":"lnussel"}}