incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [5/8] git commit: [#6656] ticket:437 Use token in github importers
Date Wed, 13 Nov 2013 22:45:01 GMT
[#6656] ticket:437 Use token in github importers


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/0775036a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/0775036a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/0775036a

Branch: refs/heads/master
Commit: 0775036a41f7bc3e6616cbc09b7093d18bf16570
Parents: d1f23ad
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Fri Oct 25 15:28:53 2013 +0000
Committer: Cory Johns <cjohns@slashdotmedia.com>
Committed: Wed Nov 13 20:45:41 2013 +0000

----------------------------------------------------------------------
 ForgeImporters/forgeimporters/github/__init__.py | 2 +-
 ForgeImporters/forgeimporters/github/code.py     | 2 +-
 ForgeImporters/forgeimporters/github/tasks.py    | 2 +-
 ForgeImporters/forgeimporters/github/tracker.py  | 2 +-
 ForgeImporters/forgeimporters/github/wiki.py     | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0775036a/ForgeImporters/forgeimporters/github/__init__.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/github/__init__.py b/ForgeImporters/forgeimporters/github/__init__.py
index a92f4a1..fb34e6b 100644
--- a/ForgeImporters/forgeimporters/github/__init__.py
+++ b/ForgeImporters/forgeimporters/github/__init__.py
@@ -46,7 +46,7 @@ class GitHubProjectExtractor(base.ProjectExtractor):
         self.token = None
         user = kw.pop('user', None)
         if user:
-            self.token = user.get_tool_data('GitHubProjectExtractor', 'token')
+            self.token = user.get_tool_data('GitHubProjectImport', 'token')
         super(GitHubProjectExtractor, self).__init__(*args, **kw)
 
     def add_token(self, url):

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0775036a/ForgeImporters/forgeimporters/github/code.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/github/code.py b/ForgeImporters/forgeimporters/github/code.py
index 1017eba..4ce2183 100644
--- a/ForgeImporters/forgeimporters/github/code.py
+++ b/ForgeImporters/forgeimporters/github/code.py
@@ -92,7 +92,7 @@ class GitHubRepoImporter(ToolImporter):
 
         """
         project_name = "%s/%s" % (user_name, project_name)
-        extractor = GitHubProjectExtractor(project_name)
+        extractor = GitHubProjectExtractor(project_name, user=user)
         repo_url = extractor.get_repo_url()
         app = project.install_app(
             "Git",

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0775036a/ForgeImporters/forgeimporters/github/tasks.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/github/tasks.py b/ForgeImporters/forgeimporters/github/tasks.py
index 9abdb3d..d74a9cd 100644
--- a/ForgeImporters/forgeimporters/github/tasks.py
+++ b/ForgeImporters/forgeimporters/github/tasks.py
@@ -31,7 +31,7 @@ def import_project_info(project_name):
     from forgeimporters.github.project import GitHubProjectImporter
     importer = GitHubProjectImporter(None)
     with ImportErrorHandler(importer, project_name, c.project) as handler:
-        extractor = GitHubProjectExtractor(project_name)
+        extractor = GitHubProjectExtractor(project_name, user=c.user)
         c.project.summary = extractor.get_summary()
         c.project.external_homepage = extractor.get_homepage()
         ThreadLocalORMSession.flush_all()

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0775036a/ForgeImporters/forgeimporters/github/tracker.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/github/tracker.py b/ForgeImporters/forgeimporters/github/tracker.py
index 5e3c134..288379b 100644
--- a/ForgeImporters/forgeimporters/github/tracker.py
+++ b/ForgeImporters/forgeimporters/github/tracker.py
@@ -114,7 +114,7 @@ class GitHubTrackerImporter(ToolImporter):
         self.github_markdown_converter = GitHubMarkdownConverter(
             kw['user_name'], project_name)
         ThreadLocalORMSession.flush_all()
-        extractor = GitHubProjectExtractor(project_name)
+        extractor = GitHubProjectExtractor(project_name, user=user)
         try:
             M.session.artifact_orm_session._get().skip_mod_date = True
             with h.push_config(c, user=M.User.anonymous(), app=app):

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0775036a/ForgeImporters/forgeimporters/github/wiki.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/github/wiki.py b/ForgeImporters/forgeimporters/github/wiki.py
index 8fae1b1..ce3214c 100644
--- a/ForgeImporters/forgeimporters/github/wiki.py
+++ b/ForgeImporters/forgeimporters/github/wiki.py
@@ -139,7 +139,7 @@ class GitHubWikiImporter(ToolImporter):
 
         """
         project_name = "%s/%s" % (user_name, project_name)
-        extractor = GitHubProjectExtractor(project_name)
+        extractor = GitHubProjectExtractor(project_name, user=user)
         if not extractor.has_wiki():
             return
 


Mime
View raw message