Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
  • 2 commits
  • 5 files changed
  • 0 commit comments
  • 2 contributors
Commits on Sep 22, 2012
@vaneyckt vaneyckt merge pull request 16d0738
Commits on Sep 23, 2012
@pengwynn pengwynn Version bump 5f0901e
View
1 CHANGELOG.md
@@ -1,5 +1,6 @@
# CHANGELOG
+* [1.14.0 - September 22,2012](https://github.com/pengwynn/octokit/compare/v1.13.0...v1.14.0)
* [1.13.0 - September 5,2012](https://github.com/pengwynn/octokit/compare/v1.12.0...v1.13.0)
* [1.12.0 - September 4,2012](https://github.com/pengwynn/octokit/compare/v1.11.0...v1.12.0)
* [1.11.0 - August 29, 2012](https://github.com/pengwynn/octokit/compare/v1.10.0...v1.11.0)
View
4 lib/octokit/client/pulls.rb
@@ -34,6 +34,10 @@ def pull_request_commits(repo, number, options={})
get("repos/#{Repository.new(repo)}/pulls/#{number}/commits", options)
end
alias :pull_commits :pull_request_commits
+
+ def merge_pull_request(repo, number, commit_message='', options={})
+ put("repos/#{Repository.new(repo)}/pulls/#{number}/merge", options.merge({:commit_message => commit_message}))
+ end
end
end
end
View
2 lib/octokit/version.rb
@@ -1,3 +1,3 @@
module Octokit
- VERSION = "1.13.0" unless defined?(Octokit::VERSION)
+ VERSION = "1.14.0" unless defined?(Octokit::VERSION)
end
View
5 spec/fixtures/v3/pull_request_merged.json
@@ -0,0 +1,5 @@
+{
+ "sha": "2097821c7c5aa4dc02a2cc54d5ca51968b373f95",
+ "merged": true,
+ "message": "Pull Request successfully merged"
+}
View
11 spec/octokit/client/pulls_spec.rb
@@ -65,4 +65,15 @@
end
+ describe ".merge_pull_request" do
+
+ it "should merge the pull request" do
+ stub_put("https://api.github.com/repos/pengwynn/octokit/pulls/67/merge").
+ to_return(:body => fixture("v3/pull_request_merged.json"))
+ response = @client.merge_pull_request("pengwynn/octokit", 67)
+ response["sha"].should == "2097821c7c5aa4dc02a2cc54d5ca51968b373f95"
+ end
+
+ end
+
end

No commit comments for this range

Something went wrong with that request. Please try again.