Commit e3dbaa70 authored by Stan Hu's avatar Stan Hu

Merge branch '1791-fix-github-issue-order' into 'master'

Fix wrong order of issues when importing from github

### 1. What does this MR do?

The order of issues imported from GitHub is fixed.

### 2. Are there points in the code the reviewer needs to double check?

Nothing.

### 3. Why was this MR needed?

The default behaviors of GitHub API at listing issues are sort: :created and direction: :desc.

See GitHub API details at https://developer.github.com/v3/issues/#list-issues.

### 4. What are the relevant issue numbers / Feature requests?

Fixes #1791

### 5. Screenshots (if relevant)

Nothing

See merge request !898
parents 88162f69 4a203aab
Please view this file on the master branch, on stable branches it's out of date. Please view this file on the master branch, on stable branches it's out of date.
v 7.13.0 (unreleased) 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 - 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) - Add `two_factor_enabled` field to admin user API (Stan Hu)
- Fix invalid timestamps in RSS feeds (Rowan Wookey) - Fix invalid timestamps in RSS feeds (Rowan Wookey)
......
...@@ -11,7 +11,9 @@ module Gitlab ...@@ -11,7 +11,9 @@ module Gitlab
def execute def execute
#Issues && Comments #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? if issue.pull_request.nil?
body = @formatter.author_line(issue.user.login, issue.body) body = @formatter.author_line(issue.user.login, issue.body)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment