thegarage-gitx 2.13.0 → 2.13.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3970bcceec2fdffef729443705a5533f089e25b5
4
- data.tar.gz: c42d584f27788dfd2491149895442665ce04fb92
3
+ metadata.gz: 3c76b9142f428f3c146f42e9ebb4cae36f5aa3e4
4
+ data.tar.gz: c1beddf110f6ef5d34179bfec65fbcf79e9bd48c
5
5
  SHA512:
6
- metadata.gz: 09941f7c3d161f8a7e8bb9f1167484713d2d12dc40d8fc4ecfddc93a37f51d93ee20319919650205b34ebe8a96ac83c0e0e042a83f2a3f3da237091357bd04c3
7
- data.tar.gz: d8960f7276396f466d4c606b1e73355cd2a2db010502f1292e787fccc04b5f06bbe17ff411119bfc68fdbd66e28ef0472fb97ea9134abf9a7128c0e50a1d5fee
6
+ metadata.gz: 5eb433fa613fe8740d57436d16707cd6cd21929ee003916619e8edf060447fb70b7eb410927b9f2f09f791f8decc0da728da91597059f02979120ad1b7491805
7
+ data.tar.gz: 689de10ba6d60de808582ab64144a573c4c760ee38614483e097f76be766f7fdb8ca9031a53d9ed157e5d1c8c43c4343e66697ccdcb6b313bd8a30503acdd49e
@@ -70,17 +70,17 @@ module Thegarage
70
70
 
71
71
  def bump_pull_request(pull_request)
72
72
  comment = comment_from_template(pull_request, BUMP_COMMENT_PREFIX, BUMP_COMMENT_FOOTER)
73
- set_review_status('pending', 'Peer review in progress')
73
+ update_review_status(pull_request, 'pending', 'Peer review in progress')
74
74
  end
75
75
 
76
76
  def reject_pull_request(pull_request)
77
77
  comment = comment_from_template(pull_request, REJECTION_COMMENT_PREFIX, REJECTION_COMMENT_FOOTER)
78
- set_review_status('failure', 'Peer review rejected')
78
+ update_review_status(pull_request, 'failure', 'Peer review rejected')
79
79
  end
80
80
 
81
81
  def approve_pull_request(pull_request)
82
82
  comment = comment_from_template(pull_request, APPROVAL_COMMENT_PREFIX, APPROVAL_COMMENT_FOOTER)
83
- set_review_status('success', 'Peer review approved')
83
+ update_review_status(pull_request, 'success', 'Peer review approved')
84
84
  end
85
85
 
86
86
  def comment_from_template(pull_request, prefix, footer)
@@ -89,11 +89,6 @@ module Thegarage
89
89
  comment = comment.gsub(footer, '').chomp.strip
90
90
  github_client.add_comment(github_slug, pull_request.number, comment)
91
91
  end
92
-
93
- def set_review_status(state, description)
94
- latest_commit = repo.head.target_id
95
- update_review_status(latest_commit, state, description)
96
- end
97
92
  end
98
93
  end
99
94
  end
@@ -52,7 +52,8 @@ module Thegarage
52
52
  end
53
53
 
54
54
  # Update build status with peer review status
55
- def update_review_status(commit_sha, state, description)
55
+ def update_review_status(pull_request, state, description)
56
+ commit_sha = pull_request.head.sha
56
57
  github_client.create_status(github_slug, commit_sha, state, context: REVIEW_CONTEXT, description: description)
57
58
  end
58
59
 
@@ -1,5 +1,5 @@
1
1
  module Thegarage
2
2
  module Gitx
3
- VERSION = '2.13.0'
3
+ VERSION = '2.13.1'
4
4
  end
5
5
  end
@@ -75,7 +75,7 @@ http_interactions:
75
75
  - d818ddef80f4c7d10683dd483558952a
76
76
  body:
77
77
  encoding: UTF-8
78
- string: '[{"html_url":"https://path/to/html/pull/request","issue_url":"https://api/path/to/issue/url","number":10,"head":{"ref":"branch_name"}}]'
78
+ string: '[{"html_url":"https://path/to/html/pull/request","issue_url":"https://api/path/to/issue/url","number":10,"head":{"ref":"branch_name", "sha": "e12da4"}}]'
79
79
  http_version:
80
80
  recorded_at: Tue, 05 Aug 2014 16:36:03 GMT
81
81
  - request:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thegarage-gitx
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.13.0
4
+ version: 2.13.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Sonnek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-16 00:00:00.000000000 Z
11
+ date: 2015-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rugged