Commit 5ea9696a1bc9a106abd538660adfb2d48827ec5a

Authored by Cyril Mougel
2 parents 03606418 15d1371f
Exists in master and in 1 other branch production

Merge pull request #598 from jozefvaclavik/master

Gitlab Issues integration update
@@ -44,7 +44,7 @@ gem 'ruby-fogbugz', :require => 'fogbugz' @@ -44,7 +44,7 @@ gem 'ruby-fogbugz', :require => 'fogbugz'
44 # Github Issues 44 # Github Issues
45 gem 'octokit', '~> 1.18' 45 gem 'octokit', '~> 1.18'
46 # Gitlab 46 # Gitlab
47 -gem 'gitlab', :git => 'https://github.com/NARKOZ/gitlab.git' 47 +gem 'gitlab', '~> 3.0.0'
48 48
49 # Bitbucket Issues 49 # Bitbucket Issues
50 gem 'bitbucket_rest_api', :require => false 50 gem 'bitbucket_rest_api', :require => false
app/models/issue_trackers/gitlab_tracker.rb
@@ -12,12 +12,16 @@ if defined? Gitlab @@ -12,12 +12,16 @@ if defined? Gitlab
12 [:project_id, { 12 [:project_id, {
13 :label => "Ticket Project ID (use Number)", 13 :label => "Ticket Project ID (use Number)",
14 :placeholder => "Gitlab Project where issues will be created" 14 :placeholder => "Gitlab Project where issues will be created"
  15 + }],
  16 + [:alt_project_id, {
  17 + :label => "Project Name (namespace/project)",
  18 + :placeholder => "Gitlab Project where issues will be created"
15 }] 19 }]
16 ] 20 ]
17 21
18 def check_params 22 def check_params
19 if Fields.detect {|f| self[f[0]].blank?} 23 if Fields.detect {|f| self[f[0]].blank?}
20 - errors.add :base, 'You must specify your Gitlab URL, API token and Project ID' 24 + errors.add :base, 'You must specify your Gitlab URL, API token, Project ID and Project Name'
21 end 25 end
22 end 26 end
23 27
@@ -43,7 +47,7 @@ if defined? Gitlab @@ -43,7 +47,7 @@ if defined? Gitlab
43 end 47 end
44 48
45 def url 49 def url
46 - "#{account}/#{project_id}/issues" 50 + "#{account}/#{alt_project_id}/issues"
47 end 51 end
48 end 52 end
49 end 53 end