This repository was archived by the owner on Jul 19, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,14 @@ def receive_quality
33
33
create_story ( name , details_url )
34
34
end
35
35
36
+ def receive_issue
37
+ title = %{Fix "#{ issue [ "check_name" ] } " issue in #{ constant_name } }
38
+
39
+ body = [ issue [ "description" ] , details_url ] . join ( "\n \n " )
40
+
41
+ create_story ( title , body )
42
+ end
43
+
36
44
def receive_vulnerability
37
45
formatter = CC ::Formatters ::TicketFormatter . new ( self )
38
46
Original file line number Diff line number Diff line change @@ -23,6 +23,23 @@ def test_vulnerability
23
23
)
24
24
end
25
25
26
+ def test_issue
27
+ payload = {
28
+ issue : {
29
+ "check_name" => "Style/LongLine" ,
30
+ "description" => "Line is too long [1000/80]"
31
+ } ,
32
+ constant_name : "foo.rb" ,
33
+ details_url : "http://example.com/repos/id/foo.rb#issue_123"
34
+ }
35
+
36
+ assert_pivotal_receives (
37
+ event ( :issue , payload ) ,
38
+ "Fix \" Style/LongLine\" issue in foo.rb" ,
39
+ "Line is too long [1000/80]\n \n http://example.com/repos/id/foo.rb#issue_123"
40
+ )
41
+ end
42
+
26
43
def test_receive_test
27
44
@stubs . post 'services/v3/projects/123/stories' do |env |
28
45
[ 200 , { } , '<story><id>123</id><url>http://foo.bar</url></story>' ]
You can’t perform that action at this time.
0 commit comments