summaryrefslogtreecommitdiff
path: root/lib/github/import.rb
Commit message (Collapse)AuthorAgeFilesLines
* Improve & simplify GitHub's representation classesRémy Coutable2017-10-051-2/+2
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Set `label_ids` and `assignee_ids` after the initial `save!`.Rémy Coutable2017-10-051-6/+12
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Fetch the remote if a PR has been created/updated after the last fetchRémy Coutable2017-10-051-4/+14
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Ensure Github::Import#execute returns false if any errors occuredRémy Coutable2017-10-051-1/+1
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Set `ref_fetched` to `true` in Github::Import#fetch_pull_requestsRémy Coutable2017-10-051-0/+1
| | | | | | | Since we fetch all the refs we need at the beginning of the import process, we can safely set this attribute. Signed-off-by: Rémy Coutable <remy@rymai.me>
* Don't even check if the branch exists locally as we only use its name in GH ↵Rémy Coutable2017-10-051-4/+0
| | | | | | | | | | | | | import The benefit is that we don't even have to create temp source/target branches. Also, when the source branch of the imported MR is from a fork, name it "user:branch" to mimic how we display it for MR when forks actually exists. Signed-off-by: Rémy Coutable <remy@rymai.me>
* Keep only the changes that are known to work wellRémy Coutable2017-10-051-1/+4
| | | | | | | | | | | | Also, improved a bit the method names in Github::Representation::PullRequest. Last but not least, ensure temp branch names doesn't contain a `/` as this would create the ref in a subfolder in `refs/heads` (e.g. `refs/heads/gh-123/456/rymai/foo`), and would leave empty directories upon branch deletion (e.g. `refs/heads/gh-123/456/rymai/`. Signed-off-by: Rémy Coutable <remy@rymai.me>
* Fetch and map refs/pull to refs/merge-requests in the GH importJames Lopez2017-10-051-4/+2
| | | | update MR diff
* Fix notes type created from importLin Jen-Shin (godfat)2017-09-291-37/+4
|
* Add a spec for Github::Client and revert an `if !` to `unless`38198-fetch-github-api-per-100Rémy Coutable2017-09-261-1/+1
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Retrieve PR comments only when we know there are anyRémy Coutable2017-09-261-19/+22
| | | | | | | | | | | | 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>
* Fetch 100 results when calling the GitHub API in Github::ImportRémy Coutable2017-09-261-6/+6
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Decrease ABC threshold to 55.25Maxim Rydkin2017-08-311-40/+42
|
* Fix error when importing a GitHub-wiki repositorybvl-improve-bare-project-importBob Van Landuyt2017-08-231-1/+1
| | | | | This would occur when Wiki's are enabled on GitHub, but there is no wiki repository
* Change `project.path_with_namespace` to `project.disk_path`Douglas Barbosa Alexandre2017-08-071-1/+1
|
* Fix small typo on Github::Import#fetch_releasesDouglas Barbosa Alexandre2017-08-071-1/+1
|
* Import GitHub releasesDouglas Barbosa Alexandre2017-08-071-0/+2
|
* Fix Github::Import cache for user idsDouglas Barbosa Alexandre2017-08-071-1/+1
|
* Expire content cache when repository fetch failsDouglas Barbosa Alexandre2017-08-071-2/+3
|
* Set the GitHub API token on options hashDouglas Barbosa Alexandre2017-08-071-2/+2
|
* Move GitHub root endpoint methods to Github::ClientDouglas Barbosa Alexandre2017-08-071-16/+1
|
* Use a custom root endpoint if defined on GH ominiauth provider settingsDouglas Barbosa Alexandre2017-08-071-1/+16
|
* Use project.import_url to fetch repositories from GithubDouglas Barbosa Alexandre2017-08-071-9/+10
|
* Rename many path_with_namespace -> full_pathGabriel Mazetto2017-08-011-1/+1
|
* Fix GitHub importer performance on branch existence checkDouglas Barbosa Alexandre2017-06-211-28/+2
|
* Github - Fix token interpolation when cloning wiki repositoryDouglas Barbosa Alexandre2017-06-121-1/+1
|
* Reset create callbacks for Issues/MRs while importing GitHub projectsDouglas Barbosa Alexandre2017-05-111-0/+2
|
* Fix token interpolation when setting the Github remoteDouglas Barbosa Alexandre2017-05-111-1/+2
|
* [Multiple issue assignee] Fix a number of specsValery Sizov2017-05-051-1/+1
|
* Fix a failing Rubocop rule on masterDouglas Barbosa Alexandre2017-04-261-17/+21
|
* Add basic progress output to GitHub importDouglas Barbosa Alexandre2017-04-251-1/+10
|
* Fix Rubocop offensesDouglas Barbosa Alexandre2017-04-251-2/+6
|
* Fix import of notes on Pull Request diffDouglas Barbosa Alexandre2017-04-251-4/+11
|
* Create project repository only when it not existsDouglas Barbosa Alexandre2017-04-251-1/+1
|
* Fix small typo on GitHub::ImportDouglas Barbosa Alexandre2017-04-251-1/+1
|
* Fix small typoDouglas Barbosa Alexandre2017-04-241-2/+2
|
* Use the base initiliazer for representationsDouglas Barbosa Alexandre2017-04-241-1/+1
|
* Cache labels at the same time we fetch them from the GH APIDouglas Barbosa Alexandre2017-04-241-8/+6
|
* Avoid unnecessary use of Arel to find users by external uidDouglas Barbosa Alexandre2017-04-241-3/+1
|
* Finish the import process if some error occurs when fetching the repoDouglas Barbosa Alexandre2017-04-241-3/+8
|
* Use only one cache hash with with a hash initializer by defaultDouglas Barbosa Alexandre2017-04-241-11/+8
|
* Rename find_by_email/find_by_external_uid methodsDouglas Barbosa Alexandre2017-04-241-3/+3
|
* Refactor rake task to to import GitHub repositoresDouglas Barbosa Alexandre2017-04-241-0/+1
|
* Keep track of import errorsDouglas Barbosa Alexandre2017-04-241-0/+10
|
* Clone GitHub wikiDouglas Barbosa Alexandre2017-04-241-2/+21
|
* Import Github releasesDouglas Barbosa Alexandre2017-04-241-0/+27
|
* Refactoring Github importDouglas Barbosa Alexandre2017-04-241-25/+38
|
* Use while instead of loop/breakDouglas Barbosa Alexandre2017-04-241-12/+10
|
* Add a method to format issues/pull requests/comments bodyDouglas Barbosa Alexandre2017-04-241-10/+24
|
* Does not remove the GitHub remoteDouglas Barbosa Alexandre2017-04-241-1/+0
|