Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Implement repo assignees #123

Merged
merged 2 commits into from

3 participants

Richard Lee Don't Add Me To Your Organization a.k.a The Travis Bot Wynn Netherland
Richard Lee

As titled. (Ref: #118.)
Please help review and let me know if there is a problem. Thanks!

Don't Add Me To Your Organization a.k.a The Travis Bot

This pull request passes (merged 58b701e into cd7a39b).

Wynn Netherland pengwynn merged commit 097cfce into from
Wynn Netherland
Owner

Thanks for the patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 9, 2012
  1. Richard Lee
  2. Richard Lee

    Implement repo assignees.

    dlackty authored
This page is out of date. Refresh to see the latest.
4 lib/octokit/client/repositories.rb
View
@@ -181,6 +181,10 @@ def repository_issue_events(repo, options={})
end
alias :repo_issue_events :repository_issue_events
+ def repository_assignees(repo, options={})
+ get "repos/#{Repository.new repo}/assignees", options, 3
+ end
+ alias :repo_assignees :repository_assignees
end
end
end
30 spec/fixtures/v3/repo_assignees.json
View
@@ -0,0 +1,30 @@
+[
+ {
+ "gravatar_id": "6490beb544d67d937dfb99a6b3ed6e44",
+ "avatar_url": "https://secure.gravatar.com/avatar/6490beb544d67d937dfb99a6b3ed6e44?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png",
+ "login": "adamstac",
+ "url": "https://api.github.com/users/adamstac",
+ "id": 2933
+ },
+ {
+ "gravatar_id": "dfb3948650131e4f0385c3328187cfca",
+ "avatar_url": "https://secure.gravatar.com/avatar/dfb3948650131e4f0385c3328187cfca?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png",
+ "login": "ctshryock",
+ "url": "https://api.github.com/users/ctshryock",
+ "id": 61721
+ },
+ {
+ "gravatar_id": "7e19cd5486b5d6dc1ef90e671ba52ae0",
+ "avatar_url": "https://secure.gravatar.com/avatar/7e19cd5486b5d6dc1ef90e671ba52ae0?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png",
+ "login": "pengwynn",
+ "url": "https://api.github.com/users/pengwynn",
+ "id": 865
+ },
+ {
+ "gravatar_id": "1f74b13f1e5c6c69cb5d7fbaabb1e2cb",
+ "avatar_url": "https://secure.gravatar.com/avatar/1f74b13f1e5c6c69cb5d7fbaabb1e2cb?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png",
+ "login": "sferik",
+ "url": "https://api.github.com/users/sferik",
+ "id": 10308
+ }
+]
11 spec/octokit/client/repositories_spec.rb
View
@@ -405,4 +405,15 @@
end
+ describe ".assignees" do
+
+ it "should list all the available assignees (owner + collaborators)" do
+ stub_get("/repos/pengwynn/octokit/assignees").
+ to_return(:body => fixture("v3/repo_assignees.json"))
+ assignees = @client.repo_assignees("pengwynn/octokit")
+ assignees.first.login.should == "adamstac"
+ end
+
+ end
+
end
Something went wrong with that request. Please try again.