pullermann 1.1.2 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/pullermann/pullermann.rb +18 -0
  2. metadata +2 -2
@@ -49,6 +49,7 @@ class Pullermann
49
49
  self.success ||= ($? == 0)
50
50
  switch_branch_back
51
51
  comment_on_github
52
+ set_status_on_github
52
53
  end
53
54
  end
54
55
 
@@ -215,6 +216,23 @@ class Pullermann
215
216
  end
216
217
  end
217
218
 
219
+ def set_status_on_github
220
+ @log.info 'Updating status on GitHub.'
221
+ if self.success
222
+ state_symbol = :success
223
+ state_word = 'passing'
224
+ else
225
+ state_symbol = :failure
226
+ state_word = 'failing'
227
+ end
228
+ @github.post(
229
+ "repos/#{@project}/statuses/#{@pull_head_sha}", {
230
+ :state => state_symbol,
231
+ :description => "Tests are #{state_word} after merging this pull request."
232
+ }
233
+ )
234
+ end
235
+
218
236
  def notion(success)
219
237
  success ? 'positive' : 'negative'
220
238
  end
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.1.2
4
+ version: 1.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-07-09 00:00:00.000000000 Z
14
+ date: 2012-09-07 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: octokit