From 15d1371fdc613c1dbf9b3ece713308a0f8165140 Mon Sep 17 00:00:00 2001 From: Jozef Vaclavik Date: Thu, 24 Oct 2013 00:37:25 +0200 Subject: [PATCH] Gitlab Issues integration update --- Gemfile | 2 +- app/models/issue_trackers/gitlab_tracker.rb | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index b971ef7..4890a76 100644 --- a/Gemfile +++ b/Gemfile @@ -44,7 +44,7 @@ gem 'ruby-fogbugz', :require => 'fogbugz' # Github Issues gem 'octokit', '~> 1.18' # Gitlab -gem 'gitlab', :git => 'https://github.com/NARKOZ/gitlab.git' +gem 'gitlab', '~> 3.0.0' # Bitbucket Issues gem 'bitbucket_rest_api', :require => false diff --git a/app/models/issue_trackers/gitlab_tracker.rb b/app/models/issue_trackers/gitlab_tracker.rb index ccea23f..64d2a7d 100644 --- a/app/models/issue_trackers/gitlab_tracker.rb +++ b/app/models/issue_trackers/gitlab_tracker.rb @@ -12,12 +12,16 @@ if defined? Gitlab [:project_id, { :label => "Ticket Project ID (use Number)", :placeholder => "Gitlab Project where issues will be created" + }], + [:alt_project_id, { + :label => "Project Name (namespace/project)", + :placeholder => "Gitlab Project where issues will be created" }] ] def check_params if Fields.detect {|f| self[f[0]].blank?} - errors.add :base, 'You must specify your Gitlab URL, API token and Project ID' + errors.add :base, 'You must specify your Gitlab URL, API token, Project ID and Project Name' end end @@ -43,7 +47,7 @@ if defined? Gitlab end def url - "#{account}/#{project_id}/issues" + "#{account}/#{alt_project_id}/issues" end end end -- libgit2 0.21.2