octokit 1.13.0 → 1.14.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +1 -0
- data/lib/octokit/client/pulls.rb +4 -0
- data/lib/octokit/version.rb +1 -1
- data/spec/fixtures/v3/pull_request_merged.json +5 -0
- data/spec/octokit/client/pulls_spec.rb +11 -0
- metadata +4 -2
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
* [1.14.0 - September 22,2012](https://github.com/pengwynn/octokit/compare/v1.13.0...v1.14.0)
|
3
4
|
* [1.13.0 - September 5,2012](https://github.com/pengwynn/octokit/compare/v1.12.0...v1.13.0)
|
4
5
|
* [1.12.0 - September 4,2012](https://github.com/pengwynn/octokit/compare/v1.11.0...v1.12.0)
|
5
6
|
* [1.11.0 - August 29, 2012](https://github.com/pengwynn/octokit/compare/v1.10.0...v1.11.0)
|
data/lib/octokit/client/pulls.rb
CHANGED
@@ -34,6 +34,10 @@ module Octokit
|
|
34
34
|
get("repos/#{Repository.new(repo)}/pulls/#{number}/commits", options)
|
35
35
|
end
|
36
36
|
alias :pull_commits :pull_request_commits
|
37
|
+
|
38
|
+
def merge_pull_request(repo, number, commit_message='', options={})
|
39
|
+
put("repos/#{Repository.new(repo)}/pulls/#{number}/merge", options.merge({:commit_message => commit_message}))
|
40
|
+
end
|
37
41
|
end
|
38
42
|
end
|
39
43
|
end
|
data/lib/octokit/version.rb
CHANGED
@@ -65,4 +65,15 @@ describe Octokit::Client::Pulls do
|
|
65
65
|
|
66
66
|
end
|
67
67
|
|
68
|
+
describe ".merge_pull_request" do
|
69
|
+
|
70
|
+
it "should merge the pull request" do
|
71
|
+
stub_put("https://api.github.com/repos/pengwynn/octokit/pulls/67/merge").
|
72
|
+
to_return(:body => fixture("v3/pull_request_merged.json"))
|
73
|
+
response = @client.merge_pull_request("pengwynn/octokit", 67)
|
74
|
+
response["sha"].should == "2097821c7c5aa4dc02a2cc54d5ca51968b373f95"
|
75
|
+
end
|
76
|
+
|
77
|
+
end
|
78
|
+
|
68
79
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: octokit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.14.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-09-
|
14
|
+
date: 2012-09-23 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: addressable
|
@@ -316,6 +316,7 @@ files:
|
|
316
316
|
- spec/fixtures/v3/pull_created.json
|
317
317
|
- spec/fixtures/v3/pull_request.json
|
318
318
|
- spec/fixtures/v3/pull_request_commits.json
|
319
|
+
- spec/fixtures/v3/pull_request_merged.json
|
319
320
|
- spec/fixtures/v3/pull_requests.json
|
320
321
|
- spec/fixtures/v3/readme.json
|
321
322
|
- spec/fixtures/v3/ref.json
|
@@ -451,6 +452,7 @@ test_files:
|
|
451
452
|
- spec/fixtures/v3/pull_created.json
|
452
453
|
- spec/fixtures/v3/pull_request.json
|
453
454
|
- spec/fixtures/v3/pull_request_commits.json
|
455
|
+
- spec/fixtures/v3/pull_request_merged.json
|
454
456
|
- spec/fixtures/v3/pull_requests.json
|
455
457
|
- spec/fixtures/v3/readme.json
|
456
458
|
- spec/fixtures/v3/ref.json
|