git-review 0.8.9 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/git-review.rb +9 -0
- metadata +3 -3
data/lib/git-review.rb
CHANGED
@@ -103,6 +103,14 @@ class GitReview
|
|
103
103
|
puts git_call(exec_cmd)
|
104
104
|
end
|
105
105
|
|
106
|
+
# Add an approving comment to the request.
|
107
|
+
def approve
|
108
|
+
return unless request_exists?
|
109
|
+
comment = 'Reviewed and approved.'
|
110
|
+
response = Octokit.add_comment source_repo, @pending_request['number'], comment
|
111
|
+
puts 'Successfully approved request.' if response[:body] == comment
|
112
|
+
end
|
113
|
+
|
106
114
|
# Close a specified request.
|
107
115
|
def close
|
108
116
|
return unless request_exists?
|
@@ -214,6 +222,7 @@ class GitReview
|
|
214
222
|
puts ' show <ID> [--full] Show details for a single request.'
|
215
223
|
puts ' browse <ID> Open a browser window and review a specified request.'
|
216
224
|
puts ' checkout <ID> [--branch] Checkout a specified request\'s changes to your local repository.'
|
225
|
+
puts ' approve <ID> Add an approving comment to a specified request.'
|
217
226
|
puts ' merge <ID> Accept a specified request by merging it into master.'
|
218
227
|
puts ' close <ID> Close a specified request.'
|
219
228
|
puts ' prepare Creates a new local branch for a request.'
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-review
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 59
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
- 8
|
9
8
|
- 9
|
10
|
-
|
9
|
+
- 0
|
10
|
+
version: 0.9.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Dominik Bamberger, Cristian Messel
|