Skip to content
This repository was archived by the owner on Jul 19, 2025. It is now read-only.

Commit 9789597

Browse files
committed
Merge pull request #60 from codeclimate/pull_requests_return_true_if_comment_present
return true when pull request commenting is enabled and a comment exists
2 parents 5c2bd01 + 30e3f84 commit 9789597

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/cc/services/github_pull_requests.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def add_comment
110110
end
111111
else
112112
@response = {
113-
ok: false,
113+
ok: true,
114114
message: "Comment already present"
115115
}
116116
end

test/github_pull_requests_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def test_pull_request_comment_already_present
177177
state: "success",
178178
})
179179

180-
assert_equal({ ok: false, message: "Comment already present" }, response)
180+
assert_equal({ ok: true, message: "Comment already present" }, response)
181181
end
182182

183183
def test_pull_request_unknown_state

0 commit comments

Comments
 (0)