Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

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.
base fork: octokit/octokit.rb
base: v1.12.0
...
head fork: octokit/octokit.rb
compare: v1.13.0
Checking mergeability… Don't worry, you can still create the pull request.
  • 3 commits
  • 5 files changed
  • 0 commit comments
  • 2 contributors
View
1  CHANGELOG.md
@@ -1,5 +1,6 @@
# CHANGELOG
+* [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)
* [1.10.0 - August 8, 2012](https://github.com/pengwynn/octokit/compare/v1.9.4...v1.10.0)
View
5 lib/octokit/client/pulls.rb
@@ -29,6 +29,11 @@ def pull_request(repo, number, options={})
get("repos/#{Repository.new(repo)}/pulls/#{number}", options)
end
alias :pull :pull_request
+
+ def pull_request_commits(repo, number, options={})
+ get("repos/#{Repository.new(repo)}/pulls/#{number}/commits", options)
+ end
+ alias :pull_commits :pull_request_commits
end
end
end
View
2  lib/octokit/version.rb
@@ -1,3 +1,3 @@
module Octokit
- VERSION = "1.12.0" unless defined?(Octokit::VERSION)
+ VERSION = "1.13.0" unless defined?(Octokit::VERSION)
end
View
45 spec/fixtures/v3/pull_request_commits.json
@@ -0,0 +1,45 @@
+[
+ {
+ "sha": "2097821c7c5aa4dc02a2cc54d5ca51968b373f95",
+ "parents": [
+ {
+ "sha": "9c5d4c76b42f535bc796f46d0bf7a5526b6066bb",
+ "url": "https://api.github.com/repos/pengwynn/octokit/commits/9c5d4c76b42f535bc796f46d0bf7a5526b6066bb"
+ }
+ ],
+ "url": "https://api.github.com/repos/pengwynn/octokit/commits/2097821c7c5aa4dc02a2cc54d5ca51968b373f95",
+ "author": {
+ "gravatar_id": "1ce18b10bd8f911566c5577042b6a44c",
+ "login": "koichiro",
+ "avatar_url": "https://secure.gravatar.com/avatar/1ce18b10bd8f911566c5577042b6a44c?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
+ "url": "https://api.github.com/users/koichiro",
+ "id": 9646
+ },
+ "committer": {
+ "gravatar_id": "1ce18b10bd8f911566c5577042b6a44c",
+ "login": "koichiro",
+ "avatar_url": "https://secure.gravatar.com/avatar/1ce18b10bd8f911566c5577042b6a44c?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
+ "url": "https://api.github.com/users/koichiro",
+ "id": 9646
+ },
+ "commit": {
+ "tree": {
+ "sha": "72bebc0a0a87b11b7ce4f1b766d2af375fc4cc24",
+ "url": "https://api.github.com/repos/pengwynn/octokit/git/trees/72bebc0a0a87b11b7ce4f1b766d2af375fc4cc24"
+ },
+ "message": "Added new paramater for github_url\n\nSupport github alternative sites.\nfor example: github:enterprise https://enterprise.github.com/",
+ "url": "https://api.github.com/repos/pengwynn/octokit/git/commits/2097821c7c5aa4dc02a2cc54d5ca51968b373f95",
+ "comment_count": 0,
+ "author": {
+ "date": "2012-01-31T02:47:47-08:00",
+ "email": "koichiro@meadowy.org",
+ "name": "Koichiro Ohba"
+ },
+ "committer": {
+ "date": "2012-01-31T02:47:47-08:00",
+ "email": "koichiro@meadowy.org",
+ "name": "Koichiro Ohba"
+ }
+ }
+ }
+]
View
11 spec/octokit/client/pulls_spec.rb
@@ -54,4 +54,15 @@
end
+ describe ".pull_request_commits" do
+
+ it "should return the commits for a pull request" do
+ stub_get("https://api.github.com/repos/pengwynn/octokit/pulls/67/commits").
+ to_return(:body => fixture("v3/pull_request_commits.json"))
+ commits = @client.pull_commits("pengwynn/octokit", 67)
+ commits.first["sha"].should == "2097821c7c5aa4dc02a2cc54d5ca51968b373f95"
+ end
+
+ end
+
end

No commit comments for this range

Something went wrong with that request. Please try again.