Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroyuki Sato <sathiroyuki@gmail.com>2015-06-26 21:11:20 +0300
committerHiroyuki Sato <sathiroyuki@gmail.com>2015-06-27 22:02:21 +0300
commit4a203aab57c69ea402939cf8fc423a0e5aaa1cab (patch)
tree2b66ffac8438b64edb1cee606bb2561bc49888e4
parent9f166a864959370d3e31931519506887b902cd11 (diff)
Fix wrong order of issues when importing from github
See API details at https://developer.github.com/v3/issues/. Refs #1791
-rw-r--r--CHANGELOG1
-rw-r--r--lib/gitlab/github_import/importer.rb4
2 files changed, 4 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 3971b924277..aaf818245cd 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,7 @@
Please view this file on the master branch, on stable branches it's out of date.
v 7.13.0 (unreleased)
+ - Fix order of issues imported form GitHub (Hiroyuki Sato)
- Fix Merge Request webhook to properly fire "merge" action when accepted from the web UI
- Add `two_factor_enabled` field to admin user API (Stan Hu)
- Fix invalid timestamps in RSS feeds (Rowan Wookey)
diff --git a/lib/gitlab/github_import/importer.rb b/lib/gitlab/github_import/importer.rb
index 23832b3233c..98039a76dcd 100644
--- a/lib/gitlab/github_import/importer.rb
+++ b/lib/gitlab/github_import/importer.rb
@@ -11,7 +11,9 @@ module Gitlab
def execute
#Issues && Comments
- client.list_issues(project.import_source, state: :all).each do |issue|
+ client.list_issues(project.import_source, state: :all,
+ sort: :created,
+ direction: :asc).each do |issue|
if issue.pull_request.nil?
body = @formatter.author_line(issue.user.login, issue.body)