Commit Graph

75 Commits

Author SHA1 Message Date
Lin Jen-Shin (godfat) 8bac6e41ef Fix notes type created from import 2017-09-29 11:18:58 +00:00
Rémy Coutable 62120acf1d Add a spec for Github::Client and revert an `if !` to `unless`
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-09-26 19:17:00 +02:00
Rémy Coutable e484a06472 Retrieve PR comments only when we know there are any
The Pull Request resource doesn't include the `comments` field, while
the Issue resource does. And since we're looping through all issues
anyway, we can freely check if the issue is a PR and has comments and in
this case only fetch comments for it.

That means if you have 1000 PRs but only 200 with comments, you will do
200 API requests instead of 1000. :notbad:

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-09-26 19:17:00 +02:00
Rémy Coutable 60053c1201 Fetch 100 results when calling the GitHub API in Github::Import
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-09-26 19:17:00 +02:00
Ahmad Sherif 41ef94e777 Migrate creating/deleting a branch to Gitaly 2017-09-06 17:25:17 +02:00
Maxim Rydkin d807d3810f Decrease ABC threshold to 55.25 2017-08-31 10:58:05 +00:00
Bob Van Landuyt f76d8c902a Fix error when importing a GitHub-wiki repository
This would occur when Wiki's are enabled on GitHub, but there is no
wiki repository
2017-08-23 13:36:38 +02:00
Douglas Barbosa Alexandre e198eea90f Change `project.path_with_namespace` to `project.disk_path` 2017-08-07 14:18:05 -03:00
Douglas Barbosa Alexandre 0e191b4ccd Allow users to disable SSL verification if not connecting to github.com 2017-08-07 14:11:38 -03:00
Douglas Barbosa Alexandre 68f568d9dc Fix small typo on Github::Import#fetch_releases 2017-08-07 13:53:08 -03:00
Douglas Barbosa Alexandre ee3d8e9340 Import GitHub releases 2017-08-07 13:52:28 -03:00
Douglas Barbosa Alexandre d20a9132bd Fix Github::Import cache for user ids 2017-08-07 13:06:13 -03:00
Douglas Barbosa Alexandre cb08cb2218 Extrac common timeout to a constant on Github::Client 2017-08-07 13:06:13 -03:00
Douglas Barbosa Alexandre 6f642e3f7b Fix small typoe on Github::Client#root_endpoint 2017-08-07 13:06:13 -03:00
Douglas Barbosa Alexandre 8021a7244d Expire content cache when repository fetch fails 2017-08-07 13:06:13 -03:00
Douglas Barbosa Alexandre 4caa429374 Set the GitHub API token on options hash 2017-08-07 13:06:13 -03:00
Douglas Barbosa Alexandre a7363d4a54 Move GitHub root endpoint methods to Github::Client 2017-08-07 13:06:12 -03:00
Douglas Barbosa Alexandre 51186e72c5 Use a custom root endpoint if defined on GH ominiauth provider settings 2017-08-07 13:06:12 -03:00
Douglas Barbosa Alexandre 81995317f9 Use project.import_url to fetch repositories from Github 2017-08-07 13:06:12 -03:00
Gabriel Mazetto abb878326c Rename many path_with_namespace -> full_path 2017-08-01 07:26:58 +02:00
Douglas Barbosa Alexandre be108ae6f0 Add a comment explaining how the branch clean up happens 2017-06-21 11:42:08 -03:00
Douglas Barbosa Alexandre 7c85d6af96 Fix Github::Representation::PullRequest#source_branch_exists? 2017-06-21 11:42:08 -03:00
Douglas Barbosa Alexandre 0e298c55ad Fix GitHub importer performance on branch existence check 2017-06-21 11:42:08 -03:00
Douglas Barbosa Alexandre 7958223c57 Github - Fix token interpolation when cloning wiki repository 2017-06-12 16:37:18 -03:00
Douglas Barbosa Alexandre e901d1209e Reset create callbacks for Issues/MRs while importing GitHub projects 2017-05-11 17:30:56 -03:00
Douglas Barbosa Alexandre c5e4e676e3 Fix token interpolation when setting the Github remote 2017-05-11 17:29:42 -03:00
Valery Sizov 34be1835af [Multiple issue assignee] Fix a number of specs 2017-05-05 15:30:19 +03:00
Douglas Barbosa Alexandre 1d0a0b9ae7 Fix a failing Rubocop rule on master 2017-04-26 14:35:34 -03:00
Douglas Barbosa Alexandre d082b78998 Add basic progress output to GitHub import 2017-04-25 23:47:49 -03:00
Douglas Barbosa Alexandre 70d15ae1d9 Fix Rubocop offenses 2017-04-25 17:08:32 -03:00
Douglas Barbosa Alexandre 44954c507e Fix import of notes on Pull Request diff 2017-04-25 17:05:40 -03:00
Douglas Barbosa Alexandre 39ab842bc2 Create project repository only when it not exists 2017-04-25 15:58:17 -03:00
Douglas Barbosa Alexandre 000a723d84 Fix small typo on GitHub::Import 2017-04-25 15:57:50 -03:00
Douglas Barbosa Alexandre 2f934ce22f Remove the Github::Error base class 2017-04-25 13:30:30 -03:00
Douglas Barbosa Alexandre 7df974c433 Add blank line before the raise method on Github::Collection 2017-04-25 13:30:08 -03:00
Douglas Barbosa Alexandre aeb1684c52 Fix small typo 2017-04-24 23:41:46 -03:00
Douglas Barbosa Alexandre dd1157c80b Use Class.new(SuperClass) to define an empty custom error class 2017-04-24 23:41:36 -03:00
Douglas Barbosa Alexandre 30794972f4 Set timeout options to the Github::Client 2017-04-24 21:21:58 -03:00
Douglas Barbosa Alexandre 5d106f2597 Use the base initiliazer for representations 2017-04-24 21:13:51 -03:00
Douglas Barbosa Alexandre 05255631ae Cache labels at the same time we fetch them from the GH API 2017-04-24 21:03:42 -03:00
Douglas Barbosa Alexandre 22a33d8256 Avoid unnecessary use of Arel to find users by external uid 2017-04-24 20:45:51 -03:00
Douglas Barbosa Alexandre 5c72ba0ff1 Finish the import process if some error occurs when fetching the repo 2017-04-24 20:28:06 -03:00
Douglas Barbosa Alexandre 1f498b73da Use only one cache hash with with a hash initializer by default 2017-04-24 20:00:11 -03:00
Douglas Barbosa Alexandre 275f00ee88 Refactoring Github::RateLimit 2017-04-24 19:49:17 -03:00
Douglas Barbosa Alexandre f73a0280c9 Extract rate limit URL to a constant 2017-04-24 19:28:08 -03:00
Douglas Barbosa Alexandre c7935dcfae Does not freeze integer values 2017-04-24 19:26:07 -03:00
Douglas Barbosa Alexandre 9bdde5796a Add Github::Representation::Base#id 2017-04-24 19:04:39 -03:00
Douglas Barbosa Alexandre 2b7328c317 Rename find_by_email/find_by_external_uid methods 2017-04-24 18:42:50 -03:00
Douglas Barbosa Alexandre e50606cd2d Refactor rake task to to import GitHub repositores 2017-04-24 16:17:52 -03:00
Douglas Barbosa Alexandre 09a6d32817 Keep track of import errors 2017-04-24 16:17:52 -03:00