diff --git a/development.ini.sample b/development.ini.sample index a883e09..2412d2c 100644 --- a/development.ini.sample +++ b/development.ini.sample @@ -17,8 +17,7 @@ checkouts_file = checkouts.pickle roboto_url = http://localhost:6543 -github_user = X -github_password = X +github_token = X collective_repos = collective.elephantvocabulary,icalendar,Products.DateRecurringIndex diff --git a/src/mr.roboto/src/mr/roboto/__init__.py b/src/mr.roboto/src/mr/roboto/__init__.py index 28dfbf5..c063868 100644 --- a/src/mr.roboto/src/mr/roboto/__init__.py +++ b/src/mr.roboto/src/mr/roboto/__init__.py @@ -57,9 +57,7 @@ def main(global_config, **settings): config.registry.settings['checkouts_file'] = settings['checkouts_file'] # github object - config.registry.settings['github'] = Github( - settings['github_user'], settings['github_password'] - ) + config.registry.settings['github'] = Github(settings['github_token']) config.add_static_view('static', 'static', cache_max_age=3600) diff --git a/src/mr.roboto/src/mr/roboto/tests/test_buildout.py b/src/mr.roboto/src/mr/roboto/tests/test_buildout.py index 842df70..674e39b 100644 --- a/src/mr.roboto/src/mr/roboto/tests/test_buildout.py +++ b/src/mr.roboto/src/mr/roboto/tests/test_buildout.py @@ -57,8 +57,7 @@ def setUp(self): 'api_key': 'xyz1234mnop', 'sources_file': sources_pickle, 'checkouts_file': checkouts_pickle, - 'github_user': 'x', - 'github_password': 'x', + 'github_token': 'x', } app = main({}, **self.settings) self.roboto = TestApp(app) diff --git a/src/mr.roboto/src/mr/roboto/tests/test_comments.py b/src/mr.roboto/src/mr/roboto/tests/test_comments.py index 157dd7e..4815697 100644 --- a/src/mr.roboto/src/mr/roboto/tests/test_comments.py +++ b/src/mr.roboto/src/mr/roboto/tests/test_comments.py @@ -96,9 +96,7 @@ def minimal_main(global_config, **settings): 'mister-roboto', ) config.registry.settings['jenkins_user_token'] = settings['jenkins_user_token'] - config.registry.settings['github'] = Github( - settings['github_user'], settings['github_password'] - ) + config.registry.settings['github'] = Github(settings['github_token']) config.scan('mr.roboto.views.comments') config.end() return config.make_wsgi_app() @@ -168,8 +166,7 @@ def setUp(self): 'api_key': 'xyz1234mnop', 'sources_file': 'sources_pickle', 'checkouts_file': 'checkouts_pickle', - 'github_user': 'x', - 'github_password': 'x', + 'github_token': 'x', 'jenkins_user_id': 'jenkins-plone-org', 'jenkins_user_token': 'some-random-token', } diff --git a/src/mr.roboto/src/mr/roboto/tests/test_config.py b/src/mr.roboto/src/mr/roboto/tests/test_config.py index 6c55f6f..974cb00 100644 --- a/src/mr.roboto/src/mr/roboto/tests/test_config.py +++ b/src/mr.roboto/src/mr/roboto/tests/test_config.py @@ -15,8 +15,7 @@ def setUp(self): 'api_key': '1234567890', 'sources_file': 'sources.pickle', 'checkouts_file': 'checkouts.pickle', - 'github_user': 'gh_user', - 'github_password': 'secret', + 'github_token': 'secret', 'debug': 'True', } app = main({}, **settings) @@ -58,8 +57,7 @@ def test_no_debug(self): 'api_key': 'x', 'sources_file': 'x', 'checkouts_file': 'x', - 'github_user': 'x', - 'github_password': 'x', + 'github_token': 'x', } app = main({}, **settings) roboto = TestApp(app) diff --git a/src/mr.roboto/src/mr/roboto/tests/test_pull_requests.py b/src/mr.roboto/src/mr/roboto/tests/test_pull_requests.py index c34493d..df443e4 100644 --- a/src/mr.roboto/src/mr/roboto/tests/test_pull_requests.py +++ b/src/mr.roboto/src/mr/roboto/tests/test_pull_requests.py @@ -47,9 +47,7 @@ def minimal_main(global_config, **settings): config.registry.settings['plone_versions'] = settings['plone_versions'] config.registry.settings['roboto_url'] = settings['roboto_url'] config.registry.settings['api_key'] = settings['api_key'] - config.registry.settings['github'] = Github( - settings['github_user'], settings['github_password'] - ) + config.registry.settings['github'] = Github(settings['github_token']) config.scan('mr.roboto.views.pull_requests') config.end() return config.make_wsgi_app() @@ -63,8 +61,7 @@ def setUp(self): 'api_key': 'xyz1234mnop', 'sources_file': 'sources_pickle', 'checkouts_file': 'checkouts_pickle', - 'github_user': 'x', - 'github_password': 'x', + 'github_token': 'x', } app = minimal_main({}, **self.settings) self.roboto = TestApp(app) diff --git a/src/mr.roboto/src/mr/roboto/tests/test_runcorejob.py b/src/mr.roboto/src/mr/roboto/tests/test_runcorejob.py index b39be8d..eac5969 100644 --- a/src/mr.roboto/src/mr/roboto/tests/test_runcorejob.py +++ b/src/mr.roboto/src/mr/roboto/tests/test_runcorejob.py @@ -107,9 +107,7 @@ def minimal_main(global_config, **settings): config.registry.settings['plone_versions'] = settings['plone_versions'] config.registry.settings['roboto_url'] = settings['roboto_url'] config.registry.settings['api_key'] = settings['api_key'] - config.registry.settings['github'] = Github( - settings['github_user'], settings['github_password'] - ) + config.registry.settings['github'] = Github(settings['github_token']) config.scan('mr.roboto.views.runcorejob') return config.make_wsgi_app() @@ -122,8 +120,7 @@ def setUp(self): 'api_key': 'xyz1234mnop', 'sources_file': 'sources_pickle', 'checkouts_file': 'checkouts_pickle', - 'github_user': 'x', - 'github_password': 'x', + 'github_token': 'x', } app = minimal_main({}, **self.settings) self.roboto = TestApp(app) diff --git a/src/mr.roboto/src/mr/roboto/tests/test_runhooks.py b/src/mr.roboto/src/mr/roboto/tests/test_runhooks.py index 2d2d107..06602ee 100644 --- a/src/mr.roboto/src/mr/roboto/tests/test_runhooks.py +++ b/src/mr.roboto/src/mr/roboto/tests/test_runhooks.py @@ -44,8 +44,7 @@ def setUp(self): 'api_key': 'xyz1234mnop', 'sources_file': 'sources_pickle', 'checkouts_file': 'checkouts_pickle', - 'github_user': 'x', - 'github_password': 'x', + 'github_token': 'x', 'collective_repos': '', 'jenkins_url': 'https://jenkins.plone.org', } diff --git a/src/mr.roboto/src/mr/roboto/tests/test_simple_views.py b/src/mr.roboto/src/mr/roboto/tests/test_simple_views.py index f8e7afa..31d6cb8 100644 --- a/src/mr.roboto/src/mr/roboto/tests/test_simple_views.py +++ b/src/mr.roboto/src/mr/roboto/tests/test_simple_views.py @@ -19,8 +19,7 @@ def setUp(self): 'api_key': 'z', 'sources_file': 'sources.pickle', 'checkouts_file': 'checkouts.pickle', - 'github_user': 'x', - 'github_password': 'x', + 'github_token': 'x', } app = main({}, **self.settings) self.roboto = TestApp(app)