octokit 1.12.0 → 1.13.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,6 @@
1
1
  # CHANGELOG
2
2
 
3
+ * [1.13.0 - September 5,2012](https://github.com/pengwynn/octokit/compare/v1.12.0...v1.13.0)
3
4
  * [1.12.0 - September 4,2012](https://github.com/pengwynn/octokit/compare/v1.11.0...v1.12.0)
4
5
  * [1.11.0 - August 29, 2012](https://github.com/pengwynn/octokit/compare/v1.10.0...v1.11.0)
5
6
  * [1.10.0 - August 8, 2012](https://github.com/pengwynn/octokit/compare/v1.9.4...v1.10.0)
@@ -29,6 +29,11 @@ module Octokit
29
29
  get("repos/#{Repository.new(repo)}/pulls/#{number}", options)
30
30
  end
31
31
  alias :pull :pull_request
32
+
33
+ def pull_request_commits(repo, number, options={})
34
+ get("repos/#{Repository.new(repo)}/pulls/#{number}/commits", options)
35
+ end
36
+ alias :pull_commits :pull_request_commits
32
37
  end
33
38
  end
34
39
  end
@@ -1,3 +1,3 @@
1
1
  module Octokit
2
- VERSION = "1.12.0" unless defined?(Octokit::VERSION)
2
+ VERSION = "1.13.0" unless defined?(Octokit::VERSION)
3
3
  end
@@ -0,0 +1,45 @@
1
+ [
2
+ {
3
+ "sha": "2097821c7c5aa4dc02a2cc54d5ca51968b373f95",
4
+ "parents": [
5
+ {
6
+ "sha": "9c5d4c76b42f535bc796f46d0bf7a5526b6066bb",
7
+ "url": "https://api.github.com/repos/pengwynn/octokit/commits/9c5d4c76b42f535bc796f46d0bf7a5526b6066bb"
8
+ }
9
+ ],
10
+ "url": "https://api.github.com/repos/pengwynn/octokit/commits/2097821c7c5aa4dc02a2cc54d5ca51968b373f95",
11
+ "author": {
12
+ "gravatar_id": "1ce18b10bd8f911566c5577042b6a44c",
13
+ "login": "koichiro",
14
+ "avatar_url": "https://secure.gravatar.com/avatar/1ce18b10bd8f911566c5577042b6a44c?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
15
+ "url": "https://api.github.com/users/koichiro",
16
+ "id": 9646
17
+ },
18
+ "committer": {
19
+ "gravatar_id": "1ce18b10bd8f911566c5577042b6a44c",
20
+ "login": "koichiro",
21
+ "avatar_url": "https://secure.gravatar.com/avatar/1ce18b10bd8f911566c5577042b6a44c?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
22
+ "url": "https://api.github.com/users/koichiro",
23
+ "id": 9646
24
+ },
25
+ "commit": {
26
+ "tree": {
27
+ "sha": "72bebc0a0a87b11b7ce4f1b766d2af375fc4cc24",
28
+ "url": "https://api.github.com/repos/pengwynn/octokit/git/trees/72bebc0a0a87b11b7ce4f1b766d2af375fc4cc24"
29
+ },
30
+ "message": "Added new paramater for github_url\n\nSupport github alternative sites.\nfor example: github:enterprise https://enterprise.github.com/",
31
+ "url": "https://api.github.com/repos/pengwynn/octokit/git/commits/2097821c7c5aa4dc02a2cc54d5ca51968b373f95",
32
+ "comment_count": 0,
33
+ "author": {
34
+ "date": "2012-01-31T02:47:47-08:00",
35
+ "email": "koichiro@meadowy.org",
36
+ "name": "Koichiro Ohba"
37
+ },
38
+ "committer": {
39
+ "date": "2012-01-31T02:47:47-08:00",
40
+ "email": "koichiro@meadowy.org",
41
+ "name": "Koichiro Ohba"
42
+ }
43
+ }
44
+ }
45
+ ]
@@ -54,4 +54,15 @@ describe Octokit::Client::Pulls do
54
54
 
55
55
  end
56
56
 
57
+ describe ".pull_request_commits" do
58
+
59
+ it "should return the commits for a pull request" do
60
+ stub_get("https://api.github.com/repos/pengwynn/octokit/pulls/67/commits").
61
+ to_return(:body => fixture("v3/pull_request_commits.json"))
62
+ commits = @client.pull_commits("pengwynn/octokit", 67)
63
+ commits.first["sha"].should == "2097821c7c5aa4dc02a2cc54d5ca51968b373f95"
64
+ end
65
+
66
+ end
67
+
57
68
  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.12.0
4
+ version: 1.13.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-04 00:00:00.000000000 Z
14
+ date: 2012-09-05 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: addressable
@@ -315,6 +315,7 @@ files:
315
315
  - spec/fixtures/v3/public_keys.json
316
316
  - spec/fixtures/v3/pull_created.json
317
317
  - spec/fixtures/v3/pull_request.json
318
+ - spec/fixtures/v3/pull_request_commits.json
318
319
  - spec/fixtures/v3/pull_requests.json
319
320
  - spec/fixtures/v3/readme.json
320
321
  - spec/fixtures/v3/ref.json
@@ -449,6 +450,7 @@ test_files:
449
450
  - spec/fixtures/v3/public_keys.json
450
451
  - spec/fixtures/v3/pull_created.json
451
452
  - spec/fixtures/v3/pull_request.json
453
+ - spec/fixtures/v3/pull_request_commits.json
452
454
  - spec/fixtures/v3/pull_requests.json
453
455
  - spec/fixtures/v3/readme.json
454
456
  - spec/fixtures/v3/ref.json