coala / corobo

A bot to help newcomers onboard OS projects! It's awesome!
MIT License
66 stars 103 forks source link

[GSoC '18] labhub: Remove `Hello World` callback #539

Closed nvzard closed 6 years ago

nvzard commented 6 years ago

Removal of automatic invitation of newcomers through Hello World message in chat room.

Closes #538

meetmangukiya commented 6 years ago

Don't we want a modified version that tells user of the new newcomer process? That is select an issue and ask a maintainer for assignment. And then maintainer will invite the newcomer to the newcomer team and then assign the issue.

TravisBuddy commented 6 years ago

Travis tests have failed

Hey @nvzard, Please read the following log in order to understand the failure reason. It'll be awesome if you fix what's wrong and commit the changes.

TravisBuddy commented 6 years ago

Travis tests have failed

Hey @nvzard, Please read the following log in order to understand the failure reason. It'll be awesome if you fix what's wrong and commit the changes.

TravisBuddy commented 6 years ago

Travis tests have failed

Hey @nvzard, Please read the following log in order to understand the failure reason. It'll be awesome if you fix what's wrong and commit the changes.

TravisBuddy commented 6 years ago

Travis tests have failed

Hey @nvzard, Please read the following log in order to understand the failure reason. It'll be awesome if you fix what's wrong and commit the changes.

TravisBuddy commented 6 years ago

Travis tests have failed

Hey @nvzard, Please read the following log in order to understand the failure reason. It'll be awesome if you fix what's wrong and commit the changes.

1st Build

python -m pytest ``` ============================= test session starts ============================== platform linux -- Python 3.6.3, pytest-3.3.0, py-1.5.2, pluggy-0.6.0 rootdir: /home/travis/build/coala/corobo, inifile: setup.cfg plugins: requests-mock-1.5.0, cov-2.5.1 collected 33 items tests/answer_test.py . [ 3%] tests/coala_lowercase_c_test.py .. [ 9%] tests/coatils_test.py ........... [ 42%] tests/deprecate_bot_prefixes_test.py . [ 45%] tests/explain_test.py . [ 48%] tests/ghetto_test.py . [ 51%] tests/git_stats_test.py . [ 54%] tests/labhub_test.py F....... [ 78%] tests/lmgtfy_test.py . [ 81%] tests/nevermind_test.py . [ 84%] tests/pitchfork_test.py . [ 87%] tests/searchdocs_test.py . [ 90%] tests/ship_it_test.py . [ 93%] tests/the_rules_test.py . [ 96%] tests/wolfram_alpha_test.py . [100%] ----------- coverage: platform linux, python 3.6.3-final-0 ----------- Name Stmts Miss Cover Missing ----------------------------------------------------------------- plugins/__init__.py 0 0 100% plugins/answer.py 25 0 100% plugins/coala_lowercase_c.py 12 0 100% plugins/coatils.py 120 0 100% plugins/constants.py 5 0 100% plugins/deprecate_bot_prefixes.py 6 0 100% plugins/explain.py 21 0 100% plugins/ghetto.py 10 0 100% plugins/git_stats.py 51 0 100% plugins/labhub.py 192 2 99% 342, 346 plugins/lmgtfy.py 4 0 100% plugins/nevermind.py 5 0 100% plugins/pitchfork.py 12 0 100% plugins/searchdocs.py 16 0 100% plugins/ship_it.py 7 0 100% plugins/the_rules.py 5 0 100% plugins/wolfram_alpha.py 18 0 100% ----------------------------------------------------------------- TOTAL 509 2 99% FAIL Required test coverage of 100% not reached. Total coverage: 99.61% =================================== FAILURES =================================== ____________________________ TestLabHub.test_alive _____________________________ self = def test_alive(self): labhub, testbot = plugin_testbot(plugins.labhub.LabHub, logging.ERROR) with patch('plugins.labhub.time.sleep') as mock_sleep: labhub.gh_repos = { 'coala': create_autospec(IGitt.GitHub.GitHub.GitHubRepository), 'coala-bears': create_autospec(IGitt.GitHub.GitHub.GitHubRepository), 'coala-utils': create_autospec(IGitt.GitHub.GitHub.GitHubRepository) } # for the branch where program sleeps labhub.gh_repos.update({str(i): create_autospec(IGitt.GitHub.GitHub.GitHubRepository) for i in range(30)}) labhub.gl_repos = { 'test': create_autospec(IGitt.GitLab.GitLab.GitLabRepository) } labhub.activate() labhub.gh_repos['coala'].search_mrs.return_value = [1, 2] labhub.gh_repos['coala-bears'].search_mrs.return_value = [] labhub.gh_repos['coala-utils'].search_mrs.return_value = [] testbot.assertCommand('!pr stats 10hours', '2 PRs opened in last 10 hours\n' 'The community is alive', timeout=100) labhub.gh_repos['coala'].search_mrs.return_value = [] testbot.assertCommand('!pr stats 5hours', > '0 PRs opened in last 5 hours\n' 'The community is dead') tests/labhub_test.py:316: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../../virtualenv/python3.6.3/lib/python3.6/site-packages/errbot/backends/test.py:456: in assertCommand msg = self.bot.pop_message(timeout) ../../../virtualenv/python3.6.3/lib/python3.6/site-packages/errbot/backends/test.py:308: in pop_message return self.outgoing_message_queue.get(timeout=timeout, block=block) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , block = True, timeout = 5 def get(self, block=True, timeout=None): '''Remove and return an item from the queue. If optional args 'block' is true and 'timeout' is None (the default), block if necessary until an item is available. If 'timeout' is a non-negative number, it blocks at most 'timeout' seconds and raises the Empty exception if no item was available within that time. Otherwise ('block' is false), return an item if one is immediately available, else raise the Empty exception ('timeout' is ignored in that case). ''' with self.not_empty: if not block: if not self._qsize(): raise Empty elif timeout is None: while not self._qsize(): self.not_empty.wait() elif timeout < 0: raise ValueError("'timeout' must be a non-negative number") else: endtime = time() + timeout while not self._qsize(): remaining = endtime - time() if remaining <= 0.0: > raise Empty E queue.Empty /opt/python/3.6.3/lib/python3.6/queue.py:172: Empty ----------------------------- Captured stdout call ----------------------------- DEBUG errbot.backends.test Merging {} to the bot config. waiting on queue message received waiting on queue ERROR backoff Giving up get_response(...) after 1 tries (RuntimeError: ('{"message":"Requires authentication","documentation_url":"https://developer.github.com/v3/repos/#list-your-repositories"}', 401)) ERROR errbot.plugins.Plugins Something went wrong in fetching github repos. Traceback (most recent call last): File "/home/travis/build/coala/corobo/plugins/labhub.py", line 48, in __init__ self.IGH.write_repositories)} File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/IGitt/GitHub/GitHub.py", line 69, in write_repositories repo_list = get(self._token, '/user/repos') File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/IGitt/GitHub/__init__.py", line 218, in get headers=headers) File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/IGitt/Interfaces/__init__.py", line 105, in _fetch resp = get_response(method, base_url + url, json=data) File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/backoff/_sync.py", line 85, in retry ret = target(*args, **kwargs) File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/backoff/_sync.py", line 85, in retry ret = target(*args, **kwargs) File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/IGitt/Interfaces/__init__.py", line 72, in get_response raise RuntimeError(response.text, response.status_code) RuntimeError: ('{"message":"Requires authentication","documentation_url":"https://developer.github.com/v3/repos/#list-your-repositories"}', 401) message received waiting on queue message received ----------------------------- Captured stderr call ----------------------------- 2018-06-05 12:17:44,894 DEBUG errbot.backends.test Merging {} to the bot config. 2018-06-05 12:17:45,317 ERROR backoff Giving up get_response(...) after 1 tries (RuntimeError: ('{"message":"Requires authentication","documentation_url":"https://developer.github.com/v3/repos/#list-your-repositories"}', 401)) 2018-06-05 12:17:45,318 ERROR errbot.plugins.Plugins Something went wrong in fetching github repos. Traceback (most recent call last): File "/home/travis/build/coala/corobo/plugins/labhub.py", line 48, in __init__ self.IGH.write_repositories)} File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/IGitt/GitHub/GitHub.py", line 69, in write_repositories repo_list = get(self._token, '/user/repos') File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/IGitt/GitHub/__init__.py", line 218, in get headers=headers) File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/IGitt/Interfaces/__init__.py", line 105, in _fetch resp = get_response(method, base_url + url, json=data) File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/backoff/_sync.py", line 85, in retry ret = target(*args, **kwargs) File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/backoff/_sync.py", line 85, in retry ret = target(*args, **kwargs) File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/IGitt/Interfaces/__init__.py", line 72, in get_response raise RuntimeError(response.text, response.status_code) RuntimeError: ('{"message":"Requires authentication","documentation_url":"https://developer.github.com/v3/repos/#list-your-repositories"}', 401) ------------------------------ Captured log call ------------------------------- test.py 371 DEBUG Merging {} to the bot config. _common.py 89 ERROR Giving up get_response(...) after 1 tries (RuntimeError: ('{"message":"Requires authentication","documentation_url":"https://developer.github.com/v3/repos/#list-your-repositories"}', 401)) labhub.py 50 ERROR Something went wrong in fetching github repos. Traceback (most recent call last): File "/home/travis/build/coala/corobo/plugins/labhub.py", line 48, in __init__ self.IGH.write_repositories)} File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/IGitt/GitHub/GitHub.py", line 69, in write_repositories repo_list = get(self._token, '/user/repos') File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/IGitt/GitHub/__init__.py", line 218, in get headers=headers) File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/IGitt/Interfaces/__init__.py", line 105, in _fetch resp = get_response(method, base_url + url, json=data) File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/backoff/_sync.py", line 85, in retry ret = target(*args, **kwargs) File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/backoff/_sync.py", line 85, in retry ret = target(*args, **kwargs) File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/IGitt/Interfaces/__init__.py", line 72, in get_response raise RuntimeError(response.text, response.status_code) RuntimeError: ('{"message":"Requires authentication","documentation_url":"https://developer.github.com/v3/repos/#list-your-repositories"}', 401) =============================== warnings summary =============================== tests/answer_test.py::TestBot cannot collect test class 'TestBot' because it has a __init__ constructor None Module already imported so can not be re-written: errbot.backends.test tests/coatils_test.py::TestBot cannot collect test class 'TestBot' because it has a __init__ constructor tests/labhub_test.py::TestBot cannot collect test class 'TestBot' because it has a __init__ constructor tests/wolfram_alpha_test.py::TestBot cannot collect test class 'TestBot' because it has a __init__ constructor -- Docs: http://doc.pytest.org/en/latest/warnings.html ============== 1 failed, 32 passed, 5 warnings in 100.95 seconds =============== ```
nvzard commented 6 years ago

Made the changes

meetmangukiya commented 6 years ago

ack https://github.com/coala/corobo/pull/539/commits/d9f12facfe3e766d1c1376bda1ec11afac22ce11

meetmangukiya commented 6 years ago

@gitmate-bot ff

gitmate-bot commented 6 years ago

Hey! I'm GitMate.io! This pull request is being fastforwarded automatically. Please DO NOT push while fastforward is in progress or your changes would be lost permanently :warning:

gitmate-bot commented 6 years ago

Automated fastforward failed! Please fastforward your pull request manually via the command line.

Reason:

Command: git merge --ff-only head/nvzard/538

Exit Code: 128

Cause:

fatal: Not possible to fast-forward, aborting.
meetmangukiya commented 6 years ago

@gitmate-bot rebase

gitmate-bot commented 6 years ago

Hey! I'm GitMate.io! This pull request is being rebased automatically. Please DO NOT push while rebase is in progress or your changes would be lost permanently :warning:

gitmate-bot commented 6 years ago

Automated rebase with GitMate.io was successful! :tada:

meetmangukiya commented 6 years ago

ack https://github.com/coala/corobo/pull/539/commits/e657707f58472989bb827cb8ce944b3a2f298a35

TravisBuddy commented 6 years ago

Travis tests have failed

Hey @nvzard, Please read the following log in order to understand the failure reason. It'll be awesome if you fix what's wrong and commit the changes.

meetmangukiya commented 6 years ago

@gitmate-bot ff

gitmate-bot commented 6 years ago

Hey! I'm GitMate.io! This pull request is being fastforwarded automatically. Please DO NOT push while fastforward is in progress or your changes would be lost permanently :warning:

gitmate-bot commented 6 years ago

Automated fastforward with GitMate.io was successful! :tada: