gitlab-org--gitlab-foss/app/models/project_services/custom_issue_tracker_service.rb

26 lines
662 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2015-01-20 19:55:35 -05:00
class CustomIssueTrackerService < IssueTrackerService
validates :project_url, :issues_url, :new_issue_url, presence: true, public_url: true, if: :activated?
def title
'Custom Issue Tracker'
2015-01-20 19:55:35 -05:00
end
def description
s_('IssueTracker|Custom issue tracker')
2015-01-20 19:55:35 -05:00
end
def self.to_param
'custom_issue_tracker'
2015-01-20 19:55:35 -05:00
end
def fields
[
{ type: 'text', name: 'project_url', placeholder: 'Project url', required: true },
{ type: 'text', name: 'issues_url', placeholder: 'Issue url', required: true },
{ type: 'text', name: 'new_issue_url', placeholder: 'New Issue url', required: true }
2015-01-20 19:55:35 -05:00
]
end
end