octopi 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +5 -0
- data/Rakefile +2 -84
- data/examples/authenticated.rb +20 -0
- data/examples/github.yml.example +14 -0
- data/examples/issues.rb +18 -0
- data/examples/overall.rb +50 -0
- data/lib/octopi/version.rb +3 -0
- data/octopi.gemspec +20 -93
- data/real_world_test/commit_test.rb +20 -0
- data/real_world_test/repository_test.rb +19 -0
- data/real_world_test/test_helper.rb +11 -0
- data/test/.gitconfig +3 -0
- data/test/api_test.rb +58 -0
- data/test/authenticated_test.rb +39 -0
- data/test/base_test.rb +20 -0
- data/test/blob_test.rb +23 -0
- data/test/branch_test.rb +20 -0
- data/test/commit_test.rb +89 -0
- data/test/file_object_test.rb +39 -0
- data/test/gist_test.rb +16 -0
- data/test/issue_comment.rb +19 -0
- data/test/issue_set_test.rb +33 -0
- data/test/issue_test.rb +136 -0
- data/test/key_set_test.rb +29 -0
- data/test/key_test.rb +35 -0
- data/test/repository_set_test.rb +23 -0
- data/test/repository_test.rb +164 -0
- data/test/stubs/account +691 -0
- data/test/stubs/blob/fcoury/octopi/plain/f6609209c3ac0badd004512d318bfaa508ea10ae +20 -0
- data/test/stubs/comments/fcoury/octopi/comments +30 -0
- data/test/stubs/comments/fcoury/octopi/comments.atom +48 -0
- data/test/stubs/commits/fcoury/octopi/f6609209c3ac0badd004512d318bfaa508ea10ae +94 -0
- data/test/stubs/commits/fcoury/octopi/lazy +491 -0
- data/test/stubs/commits/fcoury/octopi/master +477 -0
- data/test/stubs/commits/fcoury/octopi/octopi.rb +818 -0
- data/test/stubs/commits/fcoury/rboard/master +437 -0
- data/test/stubs/dashboard +231 -0
- data/test/stubs/errors/repository/not_found +16 -0
- data/test/stubs/gists/159579 +18 -0
- data/test/stubs/issues/fcoury/octopi/27 +42 -0
- data/test/stubs/issues/fcoury/octopi/27-reopened +27 -0
- data/test/stubs/issues/fcoury/octopi/28 +27 -0
- data/test/stubs/issues/fcoury/octopi/28-closed +27 -0
- data/test/stubs/issues/fcoury/octopi/28-edited +27 -0
- data/test/stubs/issues/fcoury/octopi/closed +175 -0
- data/test/stubs/issues/fcoury/octopi/comment/28-comment +15 -0
- data/test/stubs/issues/fcoury/octopi/labels/28-maybe-two-point-oh +16 -0
- data/test/stubs/issues/fcoury/octopi/labels/28-one-point-oh +16 -0
- data/test/stubs/issues/fcoury/octopi/labels/28-remove-maybe-two-point-oh +14 -0
- data/test/stubs/issues/fcoury/octopi/labels/28-remove-one-point-oh +15 -0
- data/test/stubs/issues/fcoury/octopi/new +27 -0
- data/test/stubs/issues/fcoury/octopi/open +329 -0
- data/test/stubs/issues/fcoury/octopi/search +139 -0
- data/test/stubs/login +157 -0
- data/test/stubs/repos/fcoury/octopi/branches +18 -0
- data/test/stubs/repos/fcoury/octopi/collaborators +16 -0
- data/test/stubs/repos/fcoury/octopi/delete-token +13 -0
- data/test/stubs/repos/fcoury/octopi/languages +16 -0
- data/test/stubs/repos/fcoury/octopi/main +12 -0
- data/test/stubs/repos/fcoury/octopi/master +24 -0
- data/test/stubs/repos/fcoury/octopi/tags +23 -0
- data/test/stubs/repos/fcoury/octopus/main +24 -0
- data/test/stubs/repos/fcoury/rboard/main +12 -0
- data/test/stubs/repos/fcoury/rboard/master +24 -0
- data/test/stubs/repos/search +238 -0
- data/test/stubs/repos/show/fcoury +463 -0
- data/test/stubs/repos/show/fcoury-private +454 -0
- data/test/stubs/tree/fcoury/octopi/f6609209c3ac0badd004512d318bfaa508ea10ae +54 -0
- data/test/stubs/users/Caged +26 -0
- data/test/stubs/users/FooBarWidget +26 -0
- data/test/stubs/users/aslakhellesoy +26 -0
- data/test/stubs/users/augustl +26 -0
- data/test/stubs/users/bcalloway +26 -0
- data/test/stubs/users/benaskins +26 -0
- data/test/stubs/users/benhoskings +26 -0
- data/test/stubs/users/bjeanes +27 -0
- data/test/stubs/users/cldwalker +26 -0
- data/test/stubs/users/danlucraft +26 -0
- data/test/stubs/users/dchelimsky +26 -0
- data/test/stubs/users/dcrec1 +26 -0
- data/test/stubs/users/defunkt +26 -0
- data/test/stubs/users/derencius +26 -0
- data/test/stubs/users/diy +21 -0
- data/test/stubs/users/documentcloud +26 -0
- data/test/stubs/users/drnic +26 -0
- data/test/stubs/users/dustin +26 -0
- data/test/stubs/users/eladmeidar +26 -0
- data/test/stubs/users/elliottcable +26 -0
- data/test/stubs/users/entp +26 -0
- data/test/stubs/users/fcoury +26 -0
- data/test/stubs/users/fcoury-private +36 -0
- data/test/stubs/users/follow +15 -0
- data/test/stubs/users/follow-rails +15 -0
- data/test/stubs/users/followers +24 -0
- data/test/stubs/users/following +28 -0
- data/test/stubs/users/giraffesoft +26 -0
- data/test/stubs/users/gwoliveira +26 -0
- data/test/stubs/users/hashrocket +26 -0
- data/test/stubs/users/hcatlin +26 -0
- data/test/stubs/users/jamis +26 -0
- data/test/stubs/users/jnicklas +26 -0
- data/test/stubs/users/jnunemaker +26 -0
- data/test/stubs/users/jruby +21 -0
- data/test/stubs/users/kballard +26 -0
- data/test/stubs/users/kchris +26 -0
- data/test/stubs/users/key-added +20 -0
- data/test/stubs/users/key-removed +17 -0
- data/test/stubs/users/keys +21 -0
- data/test/stubs/users/knewter +26 -0
- data/test/stubs/users/lachie +26 -0
- data/test/stubs/users/lachlanhardy +26 -0
- data/test/stubs/users/lenary +26 -0
- data/test/stubs/users/lifo +26 -0
- data/test/stubs/users/maccman +26 -0
- data/test/stubs/users/markgandolfo +26 -0
- data/test/stubs/users/mbleigh +26 -0
- data/test/stubs/users/mhodgson +26 -0
- data/test/stubs/users/mocra +26 -0
- data/test/stubs/users/mojombo +26 -0
- data/test/stubs/users/newbamboo +26 -0
- data/test/stubs/users/notahat +26 -0
- data/test/stubs/users/opscode +26 -0
- data/test/stubs/users/paulorv +26 -0
- data/test/stubs/users/pvande +21 -0
- data/test/stubs/users/rack +26 -0
- data/test/stubs/users/radar +26 -0
- data/test/stubs/users/rails +26 -0
- data/test/stubs/users/railscampau +21 -0
- data/test/stubs/users/redinger +26 -0
- data/test/stubs/users/remi +26 -0
- data/test/stubs/users/search-radar +27 -0
- data/test/stubs/users/shanesveller +26 -0
- data/test/stubs/users/shuber +26 -0
- data/test/stubs/users/softprops +26 -0
- data/test/stubs/users/superfeedr +26 -0
- data/test/stubs/users/svenfuchs +26 -0
- data/test/stubs/users/taylorrf +26 -0
- data/test/stubs/users/technoweenie +26 -0
- data/test/stubs/users/tgraham +26 -0
- data/test/stubs/users/thoughtbot +26 -0
- data/test/stubs/users/tmm1 +26 -0
- data/test/stubs/users/tobi +26 -0
- data/test/stubs/users/tpope +26 -0
- data/test/stubs/users/unfollow-rails +14 -0
- data/test/stubs/users/watched-repos +1668 -0
- data/test/stubs/users/webbynode +26 -0
- data/test/stubs/users/wvanbergen +26 -0
- data/test/stubs/users/wycats +26 -0
- data/test/tag_test.rb +20 -0
- data/test/test_helper.rb +251 -0
- data/test/user_test.rb +97 -0
- data/test_auth.rb +5 -0
- metadata +359 -73
@@ -0,0 +1,16 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Server: nginx/0.6.26
|
3
|
+
Date: Sat, 01 Aug 2009 06:07:42 GMT
|
4
|
+
Content-Type: application/x-yaml; charset=utf-8
|
5
|
+
Connection: keep-alive
|
6
|
+
Set-Cookie: _github_ses=BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNoSGFzaHsABjoKQHVzZWR7AA%3D%3D--884981fc5aa85daf318eeff084d98e2cff92578f; path=/; expires=Wed, 01 Jan 2020 08:00:00 GMT; HttpOnly
|
7
|
+
Status: 200 OK
|
8
|
+
X-Runtime: 44ms
|
9
|
+
ETag: "faa4b600dd11e351c6777caba84cd44a"
|
10
|
+
Cache-Control: private, max-age=0, must-revalidate
|
11
|
+
Content-Length: 41
|
12
|
+
|
13
|
+
|
14
|
+
---
|
15
|
+
error:
|
16
|
+
- error: repository not found
|
@@ -0,0 +1,18 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Server: nginx/0.6.26
|
3
|
+
Date: Wed, 05 Aug 2009 03:22:01 GMT
|
4
|
+
Content-Type: application/x-yaml; charset=utf-8
|
5
|
+
Connection: keep-alive
|
6
|
+
Set-Cookie: _github_ses=BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNoSGFzaHsABjoKQHVzZWR7AA%3D%3D--884981fc5aa85daf318eeff084d98e2cff92578f; path=/; expires=Wed, 01 Jan 2020 08:00:00 GMT; HttpOnly
|
7
|
+
Status: 200 OK
|
8
|
+
X-Runtime: 12ms
|
9
|
+
ETag: "325c7832994d07b5959d21773b6869ea"
|
10
|
+
Cache-Control: private, max-age=0, must-revalidate
|
11
|
+
Content-Length: 106
|
12
|
+
|
13
|
+
---
|
14
|
+
gists:
|
15
|
+
- :public: true
|
16
|
+
:description:
|
17
|
+
:repo: "159579"
|
18
|
+
:created_at: 2009-07-31 22:54:06 -07:00
|
@@ -0,0 +1,42 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Server: nginx/0.6.26
|
3
|
+
Date: Sat, 01 Aug 2009 07:14:32 GMT
|
4
|
+
Content-Type: application/x-yaml; charset=utf-8
|
5
|
+
Connection: keep-alive
|
6
|
+
Set-Cookie: _github_ses=BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNoSGFzaHsABjoKQHVzZWR7AA%3D%3D--884981fc5aa85daf318eeff084d98e2cff92578f; path=/; expires=Wed, 01 Jan 2020 08:00:00 GMT; HttpOnly
|
7
|
+
Status: 200 OK
|
8
|
+
X-Runtime: 43ms
|
9
|
+
ETag: "0b741fdd3304f8fc01f682082faa5190"
|
10
|
+
Cache-Control: private, max-age=0, must-revalidate
|
11
|
+
Content-Length: 1014
|
12
|
+
|
13
|
+
---
|
14
|
+
issue:
|
15
|
+
user: BeamerCola
|
16
|
+
updated_at: 2009-07-08 18:41:48 -07:00
|
17
|
+
body: |-
|
18
|
+
Hey there, so I'm trying to get set up with this - and I keep getting the same error whenever I try anything
|
19
|
+
|
20
|
+
authenticated_with "BeamerCola", "[api_token]" do |g|
|
21
|
+
puts g.repository("test")
|
22
|
+
end
|
23
|
+
|
24
|
+
Any method I call that hits the `Api::get` method keeps returning:
|
25
|
+
|
26
|
+
raise RetryableAPIError, resp.code.to_i if RETRYABLE_STATUS.include? resp.code.to_i
|
27
|
+
|
28
|
+
Am I missing something? It's driving me nuts. It doesn't work when doing non-authentication either.
|
29
|
+
|
30
|
+
user = User.find("fcoury")
|
31
|
+
|
32
|
+
Gives me the same error.
|
33
|
+
|
34
|
+
When I curl myself - everything works great - so I'm not seeing an issue with my API token or anything
|
35
|
+
title: "undefined method \xE2\x80\x98code\xE2\x80\x99 for #<String:0x118ab90>"
|
36
|
+
number: 27
|
37
|
+
votes: 1
|
38
|
+
closed_at: 2009-05-09 12:40:35 -07:00
|
39
|
+
labels: []
|
40
|
+
|
41
|
+
created_at: 2009-05-08 19:27:43 -07:00
|
42
|
+
state: closed
|
@@ -0,0 +1,27 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Server: nginx/0.6.31
|
3
|
+
Date: Sat, 01 Aug 2009 07:16:04 GMT
|
4
|
+
Content-Type: application/x-yaml; charset=utf-8
|
5
|
+
Connection: keep-alive
|
6
|
+
Set-Cookie: _github_ses=BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNoSGFzaHsABjoKQHVzZWR7AA%3D%3D--884981fc5aa85daf318eeff084d98e2cff92578f; path=/; expires=Wed, 01 Jan 2020 08:00:00 GMT; HttpOnly
|
7
|
+
Status: 200 OK
|
8
|
+
X-Runtime: 651ms
|
9
|
+
ETag: "556a6892e16a339a5a2721b45d19dc74"
|
10
|
+
Cache-Control: private, max-age=0, must-revalidate
|
11
|
+
Content-Length: 402
|
12
|
+
|
13
|
+
---
|
14
|
+
issue:
|
15
|
+
user: jamescallmebrent
|
16
|
+
updated_at: 2009-06-05 21:38:57 -07:00
|
17
|
+
body: |-
|
18
|
+
Gist of the trace: http://gist.github.com/120603
|
19
|
+
Example of code that yields error: http://gist.github.com/120604
|
20
|
+
title: reading commits from a private repo raises error
|
21
|
+
number: 27
|
22
|
+
votes: 3
|
23
|
+
closed_at: 2009-06-05 21:38:57 -07:00
|
24
|
+
labels: []
|
25
|
+
|
26
|
+
created_at: 2009-05-30 12:03:03 -07:00
|
27
|
+
state: open
|
@@ -0,0 +1,27 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Server: nginx/0.6.26
|
3
|
+
Date: Sat, 01 Aug 2009 07:13:45 GMT
|
4
|
+
Content-Type: application/x-yaml; charset=utf-8
|
5
|
+
Connection: keep-alive
|
6
|
+
Set-Cookie: _github_ses=BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNoSGFzaHsABjoKQHVzZWR7AA%3D%3D--884981fc5aa85daf318eeff084d98e2cff92578f; path=/; expires=Wed, 01 Jan 2020 08:00:00 GMT; HttpOnly
|
7
|
+
Status: 200 OK
|
8
|
+
X-Runtime: 59ms
|
9
|
+
ETag: "6b855a2608f7d8eb42664df1537a4c7a"
|
10
|
+
Cache-Control: private, max-age=0, must-revalidate
|
11
|
+
Content-Length: 378
|
12
|
+
|
13
|
+
---
|
14
|
+
issue:
|
15
|
+
user: jamescallmebrent
|
16
|
+
updated_at: 2009-06-05 21:38:57 -07:00
|
17
|
+
body: |-
|
18
|
+
Gist of the trace: http://gist.github.com/120603
|
19
|
+
Example of code that yields error: http://gist.github.com/120604
|
20
|
+
title: reading commits from a private repo raises error
|
21
|
+
number: 28
|
22
|
+
votes: 3
|
23
|
+
closed_at:
|
24
|
+
labels: []
|
25
|
+
|
26
|
+
created_at: 2009-05-30 12:03:03 -07:00
|
27
|
+
state: open
|
@@ -0,0 +1,27 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Server: nginx/0.6.26
|
3
|
+
Date: Sat, 01 Aug 2009 07:13:45 GMT
|
4
|
+
Content-Type: application/x-yaml; charset=utf-8
|
5
|
+
Connection: keep-alive
|
6
|
+
Set-Cookie: _github_ses=BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNoSGFzaHsABjoKQHVzZWR7AA%3D%3D--884981fc5aa85daf318eeff084d98e2cff92578f; path=/; expires=Wed, 01 Jan 2020 08:00:00 GMT; HttpOnly
|
7
|
+
Status: 200 OK
|
8
|
+
X-Runtime: 59ms
|
9
|
+
ETag: "6b855a2608f7d8eb42664df1537a4c7a"
|
10
|
+
Cache-Control: private, max-age=0, must-revalidate
|
11
|
+
Content-Length: 404
|
12
|
+
|
13
|
+
---
|
14
|
+
issue:
|
15
|
+
user: jamescallmebrent
|
16
|
+
updated_at: 2009-06-05 21:38:57 -07:00
|
17
|
+
body: |-
|
18
|
+
Gist of the trace: http://gist.github.com/120603
|
19
|
+
Example of code that yields error: http://gist.github.com/120604
|
20
|
+
title: reading commits from a private repo raises error
|
21
|
+
number: 27
|
22
|
+
votes: 3
|
23
|
+
closed_at: 2009-06-05 21:38:57 -07:00
|
24
|
+
labels: []
|
25
|
+
|
26
|
+
created_at: 2009-05-30 12:03:03 -07:00
|
27
|
+
state: closed
|
@@ -0,0 +1,27 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Server: nginx/0.6.26
|
3
|
+
Date: Sat, 01 Aug 2009 07:13:45 GMT
|
4
|
+
Content-Type: application/x-yaml; charset=utf-8
|
5
|
+
Connection: keep-alive
|
6
|
+
Set-Cookie: _github_ses=BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNoSGFzaHsABjoKQHVzZWR7AA%3D%3D--884981fc5aa85daf318eeff084d98e2cff92578f; path=/; expires=Wed, 01 Jan 2020 08:00:00 GMT; HttpOnly
|
7
|
+
Status: 200 OK
|
8
|
+
X-Runtime: 59ms
|
9
|
+
ETag: "6b855a2608f7d8eb42664df1537a4c7a"
|
10
|
+
Cache-Control: private, max-age=0, must-revalidate
|
11
|
+
Content-Length: 336
|
12
|
+
|
13
|
+
---
|
14
|
+
issue:
|
15
|
+
user: jamescallmebrent
|
16
|
+
updated_at: 2009-06-05 21:38:57 -07:00
|
17
|
+
body: |-
|
18
|
+
Gist of the trace: http://gist.github.com/120603
|
19
|
+
Example of code that yields error: http://gist.github.com/120604
|
20
|
+
title: Testing
|
21
|
+
number: 28
|
22
|
+
votes: 3
|
23
|
+
closed_at:
|
24
|
+
labels: []
|
25
|
+
|
26
|
+
created_at: 2009-05-30 12:03:03 -07:00
|
27
|
+
state: open
|
@@ -0,0 +1,175 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Server: nginx/0.6.31
|
3
|
+
Date: Sat, 01 Aug 2009 07:16:04 GMT
|
4
|
+
Content-Type: application/x-yaml; charset=utf-8
|
5
|
+
Connection: keep-alive
|
6
|
+
Set-Cookie: _github_ses=BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNoSGFzaHsABjoKQHVzZWR7AA%3D%3D--884981fc5aa85daf318eeff084d98e2cff92578f; path=/; expires=Wed, 01 Jan 2020 08:00:00 GMT; HttpOnly
|
7
|
+
Status: 200 OK
|
8
|
+
X-Runtime: 651ms
|
9
|
+
ETag: "556a6892e16a339a5a2721b45d19dc74"
|
10
|
+
Cache-Control: private, max-age=0, must-revalidate
|
11
|
+
Content-Length: 6174
|
12
|
+
|
13
|
+
---
|
14
|
+
issues:
|
15
|
+
- user: BeamerCola
|
16
|
+
updated_at: 2009-07-08 18:41:48 -07:00
|
17
|
+
body: |-
|
18
|
+
Hey there, so I'm trying to get set up with this - and I keep getting the same error whenever I try anything
|
19
|
+
|
20
|
+
authenticated_with "BeamerCola", "[api_token]" do |g|
|
21
|
+
puts g.repository("test")
|
22
|
+
end
|
23
|
+
|
24
|
+
Any method I call that hits the `Api::get` method keeps returning:
|
25
|
+
|
26
|
+
raise RetryableAPIError, resp.code.to_i if RETRYABLE_STATUS.include? resp.code.to_i
|
27
|
+
|
28
|
+
Am I missing something? It's driving me nuts. It doesn't work when doing non-authentication either.
|
29
|
+
|
30
|
+
user = User.find("fcoury")
|
31
|
+
|
32
|
+
Gives me the same error.
|
33
|
+
|
34
|
+
When I curl myself - everything works great - so I'm not seeing an issue with my API token or anything
|
35
|
+
title: "undefined method \xE2\x80\x98code\xE2\x80\x99 for #<String:0x118ab90>"
|
36
|
+
number: 27
|
37
|
+
votes: 1
|
38
|
+
closed_at: 2009-05-09 12:40:35 -07:00
|
39
|
+
labels: []
|
40
|
+
|
41
|
+
created_at: 2009-05-08 19:27:43 -07:00
|
42
|
+
state: closed
|
43
|
+
- user: runpaint
|
44
|
+
updated_at: 2009-07-08 18:41:13 -07:00
|
45
|
+
body: |-
|
46
|
+
`examples/overall.rb` contains:
|
47
|
+
|
48
|
+
# commits of a[sic] the repository
|
49
|
+
first_commit = repo.commits.first
|
50
|
+
puts "First commit: #{first_commit.id} - #{first_commit.message} - by #{first_commit.author['name']}"
|
51
|
+
|
52
|
+
`first_commit` is actually the most recent, i.e. last commit. The API doesn't necessarily return the first commit at all due to pagination being unimplemented. I'm opening this ticket because I don't know what we should do here.
|
53
|
+
|
54
|
+
We could change the example to refer to the last commit, but then this creates misleading syntax - `.first` refers to the last.
|
55
|
+
|
56
|
+
We could reverse the array before receiving returning it to the caller, but this will surely prove expensive in the case of paginated responses.
|
57
|
+
|
58
|
+
The first option is the simplest, but I'm wondering whether there are any better ideas?
|
59
|
+
title: Commit Example
|
60
|
+
number: 21
|
61
|
+
votes: 0
|
62
|
+
closed_at: 2009-04-24 15:07:09 -07:00
|
63
|
+
labels:
|
64
|
+
- Good to have
|
65
|
+
created_at: 2009-04-22 14:49:45 -07:00
|
66
|
+
state: closed
|
67
|
+
- user: runpaint
|
68
|
+
updated_at: 2009-07-08 18:41:11 -07:00
|
69
|
+
body: The status on http://github.com/develop/develop.github.com/issues/#issue/4 implies that we can get a list of labels for a given repository. The API is still throwing 500s all over the place, so I can't confirm ATM. If so, we want a .labels method for Issue objects.
|
70
|
+
title: Add .labels Reader to Issue
|
71
|
+
number: 16
|
72
|
+
votes: 0
|
73
|
+
closed_at: 2009-04-23 04:45:14 -07:00
|
74
|
+
labels: []
|
75
|
+
|
76
|
+
created_at: 2009-04-21 17:09:41 -07:00
|
77
|
+
state: closed
|
78
|
+
- user: runpaint
|
79
|
+
updated_at: 2009-07-08 18:41:11 -07:00
|
80
|
+
body: |-
|
81
|
+
If `~/.gitconfig` contains a stanza like the following, and credentials aren't specified in a method call, they should be extracted automatically.
|
82
|
+
|
83
|
+
[github]
|
84
|
+
user = kate
|
85
|
+
token = 545a9a47c1b7bd99cd06c0f812fde717
|
86
|
+
|
87
|
+
An added benefit of this approach is that applications built upon Octopi don't have to think about credential management; if the user has set up Git correctly, they'll just work, otherwise a rebuke an be issued. ;-)
|
88
|
+
title: Automatically Parse ~/.gitconfig for Credentials
|
89
|
+
number: 15
|
90
|
+
votes: 0
|
91
|
+
closed_at: 2009-04-22 05:20:32 -07:00
|
92
|
+
labels: []
|
93
|
+
|
94
|
+
created_at: 2009-04-21 12:59:45 -07:00
|
95
|
+
state: closed
|
96
|
+
- user: schacon
|
97
|
+
updated_at: 2009-07-08 18:41:09 -07:00
|
98
|
+
body: ""
|
99
|
+
title: ""
|
100
|
+
number: 14
|
101
|
+
votes: 0
|
102
|
+
closed_at: 2009-04-21 08:44:27 -07:00
|
103
|
+
labels: []
|
104
|
+
|
105
|
+
created_at: 2009-04-21 06:48:31 -07:00
|
106
|
+
state: closed
|
107
|
+
- user: webbynode
|
108
|
+
updated_at: 2009-07-08 18:41:03 -07:00
|
109
|
+
body: This issue was opened using GitHub API and Octopi
|
110
|
+
title: Sample issue
|
111
|
+
number: 13
|
112
|
+
votes: 0
|
113
|
+
closed_at: 2009-04-20 20:53:23 -07:00
|
114
|
+
labels: []
|
115
|
+
|
116
|
+
created_at: 2009-04-20 18:56:17 -07:00
|
117
|
+
state: closed
|
118
|
+
- user: fcoury
|
119
|
+
updated_at: 2009-07-08 18:41:03 -07:00
|
120
|
+
body: |-
|
121
|
+
require File.join(File.dirname(__FILE__), '..', 'lib', 'octopi')
|
122
|
+
|
123
|
+
include Octopi
|
124
|
+
|
125
|
+
user = user.find("bcalloway")
|
126
|
+
|
127
|
+
It seems that when issue is called using your find method, there is the following error: ./lib/../lib/octopi.rb:139:in find_plural': undefined methodeach' for nil:NilClass (NoMethodError)
|
128
|
+
|
129
|
+
from ./lib/../lib/octopi.rb:133:in `find_all'
|
130
|
+
from ./lib/../lib/octopi.rb:237:in `find_all'
|
131
|
+
from lib/myissues.rb:17
|
132
|
+
|
133
|
+
This is the code that produces the error:
|
134
|
+
|
135
|
+
require File.join(File.dirname(FILE), '..', 'lib', 'octopi')
|
136
|
+
include Octopi
|
137
|
+
|
138
|
+
user = User.find("bcalloway")
|
139
|
+
puts user.name
|
140
|
+
|
141
|
+
repo = user.repository("myproject")
|
142
|
+
puts repo.description
|
143
|
+
|
144
|
+
issue = Issue.find_all(user.login, repo.name)
|
145
|
+
puts "First open issue: #{issue.number} - #{issue.title} - Created at: #{issue.created_at}"
|
146
|
+
title: Bug while fetching repositories using Issue.find_all(user, repo)
|
147
|
+
number: 11
|
148
|
+
votes: 0
|
149
|
+
closed_at: 2009-04-20 14:16:22 -07:00
|
150
|
+
labels:
|
151
|
+
- bug
|
152
|
+
created_at: 2009-04-20 13:58:34 -07:00
|
153
|
+
state: closed
|
154
|
+
- user: runpaint
|
155
|
+
updated_at: 2009-07-08 18:41:02 -07:00
|
156
|
+
body: Valid user names, repository names, and SHAs match a regex, so we should check for bad data and raise a useful exception if we see it.
|
157
|
+
title: Validate User Names, Repository Names, and SHAs
|
158
|
+
number: 6
|
159
|
+
votes: 0
|
160
|
+
closed_at: 2009-04-21 08:43:58 -07:00
|
161
|
+
labels: []
|
162
|
+
|
163
|
+
created_at: 2009-04-20 08:35:17 -07:00
|
164
|
+
state: closed
|
165
|
+
- user: runpaint
|
166
|
+
updated_at: 2009-07-08 18:41:02 -07:00
|
167
|
+
body: When we generate method names for an object we should use a '?' suffix if the attribute is boolean. For example, a Repository object should have a .fork? and a .private? method. This is not only a better reflection of conventions, it also disambiguates between, in this example, 'fork' being a verb, i.e. a method which causes the repository to be forked, and 'fork' being an attribute, i.e. indicating whether the repository has been forked.
|
168
|
+
title: Boolean Attributes' Names Should Have '?' Suffix
|
169
|
+
number: 2
|
170
|
+
votes: 0
|
171
|
+
closed_at: 2009-04-22 16:34:30 -07:00
|
172
|
+
labels:
|
173
|
+
- Planned
|
174
|
+
created_at: 2009-04-20 08:20:34 -07:00
|
175
|
+
state: closed
|
@@ -0,0 +1,15 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Server: nginx/0.6.26
|
3
|
+
Date: Sat, 01 Aug 2009 07:13:45 GMT
|
4
|
+
Content-Type: application/x-yaml; charset=utf-8
|
5
|
+
Connection: keep-alive
|
6
|
+
Set-Cookie: _github_ses=BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNoSGFzaHsABjoKQHVzZWR7AA%3D%3D--884981fc5aa85daf318eeff084d98e2cff92578f; path=/; expires=Wed, 01 Jan 2020 08:00:00 GMT; HttpOnly
|
7
|
+
Status: 200 OK
|
8
|
+
X-Runtime: 59ms
|
9
|
+
ETag: "6b855a2608f7d8eb42664df1537a4c7a"
|
10
|
+
Cache-Control: private, max-age=0, must-revalidate
|
11
|
+
Content-Length: 55
|
12
|
+
|
13
|
+
comment:
|
14
|
+
comment: "Yes, it is broken"
|
15
|
+
status: saved
|
@@ -0,0 +1,16 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Server: nginx/0.6.31
|
3
|
+
Date: Sat, 01 Aug 2009 07:16:04 GMT
|
4
|
+
Content-Type: application/x-yaml; charset=utf-8
|
5
|
+
Connection: keep-alive
|
6
|
+
Set-Cookie: _github_ses=BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNoSGFzaHsABjoKQHVzZWR7AA%3D%3D--884981fc5aa85daf318eeff084d98e2cff92578f; path=/; expires=Wed, 01 Jan 2020 08:00:00 GMT; HttpOnly
|
7
|
+
Status: 200 OK
|
8
|
+
X-Runtime: 651ms
|
9
|
+
ETag: "556a6892e16a339a5a2721b45d19dc74"
|
10
|
+
Cache-Control: private, max-age=0, must-revalidate
|
11
|
+
Content-Length: 52
|
12
|
+
|
13
|
+
---
|
14
|
+
labels:
|
15
|
+
- one-point-oh
|
16
|
+
- maybe-two-point-oh
|
@@ -0,0 +1,16 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Server: nginx/0.6.31
|
3
|
+
Date: Sat, 01 Aug 2009 07:16:04 GMT
|
4
|
+
Content-Type: application/x-yaml; charset=utf-8
|
5
|
+
Connection: keep-alive
|
6
|
+
Set-Cookie: _github_ses=BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNoSGFzaHsABjoKQHVzZWR7AA%3D%3D--884981fc5aa85daf318eeff084d98e2cff92578f; path=/; expires=Wed, 01 Jan 2020 08:00:00 GMT; HttpOnly
|
7
|
+
Status: 200 OK
|
8
|
+
X-Runtime: 651ms
|
9
|
+
ETag: "556a6892e16a339a5a2721b45d19dc74"
|
10
|
+
Cache-Control: private, max-age=0, must-revalidate
|
11
|
+
Content-Length: 29
|
12
|
+
|
13
|
+
|
14
|
+
---
|
15
|
+
labels:
|
16
|
+
- one-point-oh
|
@@ -0,0 +1,14 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Server: nginx/0.6.31
|
3
|
+
Date: Sat, 01 Aug 2009 07:16:04 GMT
|
4
|
+
Content-Type: application/x-yaml; charset=utf-8
|
5
|
+
Connection: keep-alive
|
6
|
+
Set-Cookie: _github_ses=BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNoSGFzaHsABjoKQHVzZWR7AA%3D%3D--884981fc5aa85daf318eeff084d98e2cff92578f; path=/; expires=Wed, 01 Jan 2020 08:00:00 GMT; HttpOnly
|
7
|
+
Status: 200 OK
|
8
|
+
X-Runtime: 651ms
|
9
|
+
ETag: "556a6892e16a339a5a2721b45d19dc74"
|
10
|
+
Cache-Control: private, max-age=0, must-revalidate
|
11
|
+
Content-Length: 15
|
12
|
+
|
13
|
+
---
|
14
|
+
labels: []
|
@@ -0,0 +1,15 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
Server: nginx/0.6.31
|
3
|
+
Date: Sat, 01 Aug 2009 07:16:04 GMT
|
4
|
+
Content-Type: application/x-yaml; charset=utf-8
|
5
|
+
Connection: keep-alive
|
6
|
+
Set-Cookie: _github_ses=BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNoSGFzaHsABjoKQHVzZWR7AA%3D%3D--884981fc5aa85daf318eeff084d98e2cff92578f; path=/; expires=Wed, 01 Jan 2020 08:00:00 GMT; HttpOnly
|
7
|
+
Status: 200 OK
|
8
|
+
X-Runtime: 651ms
|
9
|
+
ETag: "556a6892e16a339a5a2721b45d19dc74"
|
10
|
+
Cache-Control: private, max-age=0, must-revalidate
|
11
|
+
Content-Length: 36
|
12
|
+
|
13
|
+
---
|
14
|
+
labels:
|
15
|
+
- maybe-two-point-oh
|