Read about our upcoming Code of Conduct on this issue

external_issue.rb 498 Bytes
Newer Older
1
class ExternalIssue
2
3
  include Referable

4
5
6
7
8
9
10
11
  def initialize(issue_identifier, project)
    @issue_identifier, @project = issue_identifier, project
  end

  def to_s
    @issue_identifier.to_s
  end

12
13
14
15
  def to_reference(_from_project = nil)
    id
  end

16
17
18
19
20
21
22
23
  def id
    @issue_identifier.to_s
  end

  def iid
    @issue_identifier.to_s
  end

24
25
26
27
  def title
    "External Issue #{self}"
  end

28
29
30
31
32
33
34
35
  def ==(other)
    other.is_a?(self.class) && (to_s == other.to_s)
  end

  def project
    @project
  end
end