pullermann 1.5.1 → 1.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/pullermann/pullermann.rb +9 -0
  2. metadata +1 -1
@@ -50,6 +50,7 @@ class Pullermann
50
50
  # Jump to next iteration if source and/or target didn't change since last run.
51
51
  next unless run_necessary?
52
52
  set_status_on_github
53
+ remove_comment unless self.reuse_comments
53
54
  true
54
55
  end
55
56
  # Run code on all selected requests.
@@ -227,6 +228,14 @@ class Pullermann
227
228
  @request.comment.body.include? '( Success: '
228
229
  end
229
230
 
231
+ def remove_comment
232
+ if @request.comment
233
+ # Remove old comment and reset variable.
234
+ call_github.delete_comment(@project, @request.comment.id)
235
+ @request.comment = nil
236
+ end
237
+ end
238
+
230
239
  def comment_on_github
231
240
  # Determine comment message.
232
241
  message = if self.success
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pullermann
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.5.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: