octokit 3.0.0 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/lib/octokit/authentication.rb +4 -4
  3. data/lib/octokit/client.rb +70 -5
  4. data/lib/octokit/client/authorizations.rb +123 -29
  5. data/lib/octokit/client/commit_comments.rb +7 -7
  6. data/lib/octokit/client/commits.rb +11 -11
  7. data/lib/octokit/client/contents.rb +7 -7
  8. data/lib/octokit/client/deployments.rb +5 -5
  9. data/lib/octokit/client/downloads.rb +5 -5
  10. data/lib/octokit/client/emojis.rb +1 -1
  11. data/lib/octokit/client/events.rb +15 -15
  12. data/lib/octokit/client/feeds.rb +2 -2
  13. data/lib/octokit/client/gists.rb +17 -17
  14. data/lib/octokit/client/gitignore.rb +3 -3
  15. data/lib/octokit/client/hooks.rb +1 -1
  16. data/lib/octokit/client/issues.rb +16 -16
  17. data/lib/octokit/client/labels.rb +14 -14
  18. data/lib/octokit/client/legacy_search.rb +3 -3
  19. data/lib/octokit/client/markdown.rb +2 -2
  20. data/lib/octokit/client/meta.rb +2 -2
  21. data/lib/octokit/client/milestones.rb +6 -6
  22. data/lib/octokit/client/notifications.rb +10 -10
  23. data/lib/octokit/client/objects.rb +8 -8
  24. data/lib/octokit/client/organizations.rb +30 -30
  25. data/lib/octokit/client/pages.rb +4 -4
  26. data/lib/octokit/client/pub_sub_hubbub.rb +5 -5
  27. data/lib/octokit/client/pull_requests.rb +20 -20
  28. data/lib/octokit/client/rate_limit.rb +5 -5
  29. data/lib/octokit/client/refs.rb +9 -9
  30. data/lib/octokit/client/releases.rb +11 -11
  31. data/lib/octokit/client/repositories.rb +44 -44
  32. data/lib/octokit/client/search.rb +5 -5
  33. data/lib/octokit/client/stats.rb +6 -6
  34. data/lib/octokit/client/statuses.rb +3 -3
  35. data/lib/octokit/client/users.rb +36 -36
  36. data/lib/octokit/configurable.rb +4 -4
  37. data/lib/octokit/error.rb +4 -0
  38. data/lib/octokit/rate_limit.rb +1 -1
  39. data/lib/octokit/version.rb +1 -1
  40. metadata +9 -9
@@ -3,13 +3,13 @@ module Octokit
3
3
 
4
4
  # Methods for API rate limiting info
5
5
  #
6
- # @see http://developer.github.com/v3/#rate-limiting
6
+ # @see https://developer.github.com/v3/#rate-limiting
7
7
  module RateLimit
8
8
 
9
9
  # Get rate limit info from last response if available
10
10
  # or make a new request to fetch rate limit
11
11
  #
12
- # @see http://developer.github.com/v3/rate_limit/#rate-limit
12
+ # @see https://developer.github.com/v3/rate_limit/#rate-limit
13
13
  # @return [Octokit::RateLimit] Rate limit info
14
14
  def rate_limit(options = {})
15
15
  return rate_limit! if last_response.nil?
@@ -20,7 +20,7 @@ module Octokit
20
20
 
21
21
  # Get number of rate limted requests remaining
22
22
  #
23
- # @see http://developer.github.com/v3/rate_limit/#rate-limit
23
+ # @see https://developer.github.com/v3/rate_limit/#rate-limit
24
24
  # @return [Fixnum] Number of requests remaining in this period
25
25
  def rate_limit_remaining(options = {})
26
26
  octokit_warn "Deprecated: Please use .rate_limit.remaining"
@@ -30,7 +30,7 @@ module Octokit
30
30
 
31
31
  # Refresh rate limit info by making a new request
32
32
  #
33
- # @see http://developer.github.com/v3/rate_limit/#rate-limit
33
+ # @see https://developer.github.com/v3/rate_limit/#rate-limit
34
34
  # @return [Octokit::RateLimit] Rate limit info
35
35
  def rate_limit!(options = {})
36
36
  get "rate_limit"
@@ -40,7 +40,7 @@ module Octokit
40
40
 
41
41
  # Refresh rate limit info and get number of rate limted requests remaining
42
42
  #
43
- # @see http://developer.github.com/v3/rate_limit/#rate-limit
43
+ # @see https://developer.github.com/v3/rate_limit/#rate-limit
44
44
  # @return [Fixnum] Number of requests remaining in this period
45
45
  def rate_limit_remaining!(options = {})
46
46
  octokit_warn "Deprecated: Please use .rate_limit!.remaining"
@@ -3,7 +3,7 @@ module Octokit
3
3
 
4
4
  # Methods for References for Git Data API
5
5
  #
6
- # @see http://developer.github.com/v3/git/refs/
6
+ # @see https://developer.github.com/v3/git/refs/
7
7
  module Refs
8
8
 
9
9
  # List all refs for a given user and repo
@@ -11,13 +11,13 @@ module Octokit
11
11
  # @param repo [String, Repository, Hash] A GitHub repository
12
12
  # @param namespace [String] The ref namespace, e.g. <tt>tag</tt> or <tt>heads</tt>
13
13
  # @return [Array<Sawyer::Resource>] A list of references matching the repo and the namespace
14
- # @see http://developer.github.com/v3/git/refs/#get-all-references
14
+ # @see https://developer.github.com/v3/git/refs/#get-all-references
15
15
  # @example Fetch all refs for sferik/rails_admin
16
16
  # Octokit.refs("sferik/rails_admin")
17
17
  def refs(repo, namespace = nil, options = {})
18
18
  path = "repos/#{Repository.new(repo)}/git/refs"
19
19
  path += "/#{namespace}" unless namespace.nil?
20
- get path, options
20
+ paginate path, options
21
21
  end
22
22
  alias :list_refs :refs
23
23
  alias :references :refs
@@ -28,7 +28,7 @@ module Octokit
28
28
  # @param repo [String, Repository, Hash] A GitHub repository
29
29
  # @param ref [String] The ref, e.g. <tt>tags/v0.0.3</tt>
30
30
  # @return [Sawyer::Resource] The reference matching the given repo and the ref id
31
- # @see http://developer.github.com/v3/git/refs/#get-a-reference
31
+ # @see https://developer.github.com/v3/git/refs/#get-a-reference
32
32
  # @example Fetch tags/v0.0.3 for sferik/rails_admin
33
33
  # Octokit.ref("sferik/rails_admin","tags/v0.0.3")
34
34
  def ref(repo, ref, options = {})
@@ -42,7 +42,7 @@ module Octokit
42
42
  # @param ref [String] The ref, e.g. <tt>tags/v0.0.3</tt>
43
43
  # @param sha [String] A SHA, e.g. <tt>827efc6d56897b048c772eb4087f854f46256132</tt>
44
44
  # @return [Array<Sawyer::Resource>] The list of references, already containing the new one
45
- # @see http://developer.github.com/v3/git/refs/#create-a-reference
45
+ # @see https://developer.github.com/v3/git/refs/#create-a-reference
46
46
  # @example Create refs/heads/master for octocat/Hello-World with sha 827efc6d56897b048c772eb4087f854f46256132
47
47
  # Octokit.create_ref("octocat/Hello-World","heads/master", "827efc6d56897b048c772eb4087f854f46256132")
48
48
  def create_ref(repo, ref, sha, options = {})
@@ -61,7 +61,7 @@ module Octokit
61
61
  # @param sha [String] A SHA, e.g. <tt>827efc6d56897b048c772eb4087f854f46256132</tt>
62
62
  # @param force [Boolean] A flag indicating one wants to force the update to make sure the update is a fast-forward update.
63
63
  # @return [Array<Sawyer::Resource>] The list of references updated
64
- # @see http://developer.github.com/v3/git/refs/#update-a-reference
64
+ # @see https://developer.github.com/v3/git/refs/#update-a-reference
65
65
  # @example Force update heads/sc/featureA for octocat/Hello-World with sha aa218f56b14c9653891f9e74264a383fa43fefbd
66
66
  # Octokit.update_ref("octocat/Hello-World","heads/sc/featureA", "aa218f56b14c9653891f9e74264a383fa43fefbd")
67
67
  def update_ref(repo, ref, sha, force = true, options = {})
@@ -80,7 +80,7 @@ module Octokit
80
80
  # @param sha [String] A SHA, e.g. <tt>827efc6d56897b048c772eb4087f854f46256132</tt>
81
81
  # @param force [Boolean] A flag indicating one wants to force the update to make sure the update is a fast-forward update.
82
82
  # @return [Array<Sawyer::Resource>] The list of references updated
83
- # @see http://developer.github.com/v3/git/refs/#update-a-reference
83
+ # @see https://developer.github.com/v3/git/refs/#update-a-reference
84
84
  # @example Force update heads/sc/featureA for octocat/Hello-World with sha aa218f56b14c9653891f9e74264a383fa43fefbd
85
85
  # Octokit.update_ref("octocat/Hello-World","sc/featureA", "aa218f56b14c9653891f9e74264a383fa43fefbd")
86
86
  def update_branch(repo, branch, sha, force = true, options = {})
@@ -92,7 +92,7 @@ module Octokit
92
92
  # @param repo [String, Repository, Hash] A GitHub repository
93
93
  # @param branch [String] The branch, e.g. <tt>fix-refs</tt>
94
94
  # @return [Boolean] Success
95
- # @see http://developer.github.com/v3/git/refs/#delete-a-reference
95
+ # @see https://developer.github.com/v3/git/refs/#delete-a-reference
96
96
  # @example Delete uritemplate for sigmavirus24/github3.py
97
97
  # Octokit.delete_branch("sigmavirus24/github3.py", "uritemplate")
98
98
  def delete_branch(repo, branch, options = {})
@@ -104,7 +104,7 @@ module Octokit
104
104
  # @param repo [String, Repository, Hash] A GitHub repository
105
105
  # @param ref [String] The ref, e.g. <tt>tags/v0.0.3</tt>
106
106
  # @return [Boolean] Success
107
- # @see http://developer.github.com/v3/git/refs/#delete-a-reference
107
+ # @see https://developer.github.com/v3/git/refs/#delete-a-reference
108
108
  # @example Delete tags/v0.0.3 for sferik/rails_admin
109
109
  # Octokit.delete_ref("sferik/rails_admin","tags/v0.0.3")
110
110
  def delete_ref(repo, ref, options = {})
@@ -3,14 +3,14 @@ module Octokit
3
3
 
4
4
  # Methods for the Releases API
5
5
  #
6
- # @see http://developer.github.com/v3/repos/releases/
6
+ # @see https://developer.github.com/v3/repos/releases/
7
7
  module Releases
8
8
 
9
9
  # List releases for a repository
10
10
  #
11
11
  # @param repo [String, Repository, Hash] A GitHub repository
12
12
  # @return [Array<Sawyer::Resource>] A list of releases
13
- # @see http://developer.github.com/v3/repos/releases/#list-releases-for-a-repository
13
+ # @see https://developer.github.com/v3/repos/releases/#list-releases-for-a-repository
14
14
  def releases(repo, options = {})
15
15
  paginate "repos/#{Repository.new(repo)}/releases", options
16
16
  end
@@ -26,7 +26,7 @@ module Octokit
26
26
  # @option options [String] :draft Mark this release as a draft
27
27
  # @option options [String] :prerelease Mark this release as a pre-release
28
28
  # @return [Sawyer::Resource] The release
29
- # @see http://developer.github.com/v3/repos/releases/#create-a-release
29
+ # @see https://developer.github.com/v3/repos/releases/#create-a-release
30
30
  def create_release(repo, tag_name, options = {})
31
31
  opts = options.merge(:tag_name => tag_name)
32
32
  post "repos/#{Repository.new(repo)}/releases", opts
@@ -36,7 +36,7 @@ module Octokit
36
36
  #
37
37
  # @param url [String] URL for the release as returned from .releases
38
38
  # @return [Sawyer::Resource] The release
39
- # @see http://developer.github.com/v3/repos/releases/#get-a-single-release
39
+ # @see https://developer.github.com/v3/repos/releases/#get-a-single-release
40
40
  def release(url, options = {})
41
41
  get url, options
42
42
  end
@@ -50,7 +50,7 @@ module Octokit
50
50
  # @option options [String] :draft Mark this release as a draft
51
51
  # @option options [String] :prerelease Mark this release as a pre-release
52
52
  # @return [Sawyer::Resource] The release
53
- # @see http://developer.github.com/v3/repos/releases/#edit-a-release
53
+ # @see https://developer.github.com/v3/repos/releases/#edit-a-release
54
54
  def update_release(url, options = {})
55
55
  patch url, options
56
56
  end
@@ -60,7 +60,7 @@ module Octokit
60
60
  #
61
61
  # @param url [String] URL for the release as returned from .releases
62
62
  # @return [Boolean] Success or failure
63
- # @see http://developer.github.com/v3/repos/releases/#delete-a-release
63
+ # @see https://developer.github.com/v3/repos/releases/#delete-a-release
64
64
  def delete_release(url, options = {})
65
65
  boolean_from_response(:delete, url, options)
66
66
  end
@@ -69,7 +69,7 @@ module Octokit
69
69
  #
70
70
  # @param release_url [String] URL for the release as returned from .releases
71
71
  # @return [Array<Sawyer::Resource>] A list of release assets
72
- # @see http://developer.github.com/v3/repos/releases/#list-assets-for-a-release
72
+ # @see https://developer.github.com/v3/repos/releases/#list-assets-for-a-release
73
73
  def release_assets(release_url, options = {})
74
74
  paginate release(release_url).rels[:assets].href, options
75
75
  end
@@ -81,7 +81,7 @@ module Octokit
81
81
  # @option options [String] :content_type The MIME type for the file to upload
82
82
  # @option options [String] :name The name for the file
83
83
  # @return [Sawyer::Resource] The release asset
84
- # @see http://developer.github.com/v3/repos/releases/#upload-a-release-asset
84
+ # @see https://developer.github.com/v3/repos/releases/#upload-a-release-asset
85
85
  def upload_asset(release_url, path_or_file, options = {})
86
86
  file = path_or_file.respond_to?(:read) ? path_or_file : File.new(path_or_file, "r+b")
87
87
  options[:content_type] ||= content_type_from_file(file)
@@ -101,7 +101,7 @@ module Octokit
101
101
  #
102
102
  # @param asset_url [String] URL for the asset as returned from .release_assets
103
103
  # @return [Sawyer::Resource] The release asset
104
- # @see http://developer.github.com/v3/repos/releases/#get-a-single-release-asset
104
+ # @see https://developer.github.com/v3/repos/releases/#get-a-single-release-asset
105
105
  def release_asset(asset_url, options = {})
106
106
  get(asset_url, options)
107
107
  end
@@ -112,7 +112,7 @@ module Octokit
112
112
  # @option options [String] :name The name for the file
113
113
  # @option options [String] :label The download text for the file
114
114
  # @return [Sawyer::Resource] The release asset
115
- # @see http://developer.github.com/v3/repos/releases/#edit-a-release-asset
115
+ # @see https://developer.github.com/v3/repos/releases/#edit-a-release-asset
116
116
  def update_release_asset(asset_url, options = {})
117
117
  patch(asset_url, options)
118
118
  end
@@ -122,7 +122,7 @@ module Octokit
122
122
  #
123
123
  # @param asset_url [String] URL for the asset as returned from .release_assets
124
124
  # @return [Boolean] Success or failure
125
- # @see http://developer.github.com/v3/repos/releases/#delete-a-release-asset
125
+ # @see https://developer.github.com/v3/repos/releases/#delete-a-release-asset
126
126
  def delete_release_asset(asset_url, options = {})
127
127
  boolean_from_response(:delete, asset_url, options)
128
128
  end
@@ -3,12 +3,12 @@ module Octokit
3
3
 
4
4
  # Methods for the Repositories API
5
5
  #
6
- # @see http://developer.github.com/v3/repos/
6
+ # @see https://developer.github.com/v3/repos/
7
7
  module Repositories
8
8
 
9
9
  # Check if a repository exists
10
10
  #
11
- # @see http://developer.github.com/v3/repos/#get
11
+ # @see https://developer.github.com/v3/repos/#get
12
12
  # @param repo [String, Hash, Repository] A GitHub repository
13
13
  # @return [Sawyer::Resource] if a repository exists, false otherwise
14
14
  def repository?(repo, options = {})
@@ -19,7 +19,7 @@ module Octokit
19
19
 
20
20
  # Get a single repository
21
21
  #
22
- # @see http://developer.github.com/v3/repos/#get
22
+ # @see https://developer.github.com/v3/repos/#get
23
23
  # @param repo [String, Hash, Repository] A GitHub repository
24
24
  # @return [Sawyer::Resource] Repository information
25
25
  def repository(repo, options = {})
@@ -29,7 +29,7 @@ module Octokit
29
29
 
30
30
  # Edit a repository
31
31
  #
32
- # @see http://developer.github.com/v3/repos/#edit
32
+ # @see https://developer.github.com/v3/repos/#edit
33
33
  # @param repo [String, Hash, Repository] A GitHub repository
34
34
  # @param options [Hash] Repository information to update
35
35
  # @option options [String] :name Name of the repo
@@ -59,8 +59,8 @@ module Octokit
59
59
  # organization's public repositories will be listed. For retrieving
60
60
  # organization repositories the {Organizations#organization_repositories}
61
61
  # method should be used instead.
62
- # @see http://developer.github.com/v3/repos/#list-your-repositories
63
- # @see http://developer.github.com/v3/repos/#list-user-repositories
62
+ # @see https://developer.github.com/v3/repos/#list-your-repositories
63
+ # @see https://developer.github.com/v3/repos/#list-user-repositories
64
64
  # @param username [String] Optional username for which to list repos
65
65
  # @return [Array<Sawyer::Resource>] List of repositories
66
66
  def repositories(username=nil, options = {})
@@ -79,7 +79,7 @@ module Octokit
79
79
  # This provides a dump of every repository, in the order that they were
80
80
  # created.
81
81
  #
82
- # @see http://developer.github.com/v3/repos/#list-all-public-repositories
82
+ # @see https://developer.github.com/v3/repos/#list-all-public-repositories
83
83
  #
84
84
  # @param options [Hash] Optional options
85
85
  # @option options [Integer] :since The integer ID of the last Repository
@@ -93,7 +93,7 @@ module Octokit
93
93
  #
94
94
  # @param repo [String, Hash, Repository] A GitHub repository
95
95
  # @return [Boolean] `true` if successfully starred
96
- # @see http://developer.github.com/v3/activity/starring/#star-a-repository
96
+ # @see https://developer.github.com/v3/activity/starring/#star-a-repository
97
97
  def star(repo, options = {})
98
98
  boolean_from_response :put, "user/starred/#{Repository.new(repo)}", options
99
99
  end
@@ -102,7 +102,7 @@ module Octokit
102
102
  #
103
103
  # @param repo [String, Hash, Repository] A GitHub repository
104
104
  # @return [Boolean] `true` if successfully unstarred
105
- # @see http://developer.github.com/v3/activity/starring/#unstar-a-repository
105
+ # @see https://developer.github.com/v3/activity/starring/#unstar-a-repository
106
106
  def unstar(repo, options = {})
107
107
  boolean_from_response :delete, "user/starred/#{Repository.new(repo)}", options
108
108
  end
@@ -112,7 +112,7 @@ module Octokit
112
112
  # @param repo [String, Hash, Repository] A GitHub repository
113
113
  # @return [Boolean] `true` if successfully watched
114
114
  # @deprecated Use #star instead
115
- # @see http://developer.github.com/v3/activity/watching/#watch-a-repository-legacy
115
+ # @see https://developer.github.com/v3/activity/watching/#watch-a-repository-legacy
116
116
  def watch(repo, options = {})
117
117
  boolean_from_response :put, "user/watched/#{Repository.new(repo)}", options
118
118
  end
@@ -122,7 +122,7 @@ module Octokit
122
122
  # @param repo [String, Hash, Repository] A GitHub repository
123
123
  # @return [Boolean] `true` if successfully unwatched
124
124
  # @deprecated Use #unstar instead
125
- # @see http://developer.github.com/v3/activity/watching/#stop-watching-a-repository-legacy
125
+ # @see https://developer.github.com/v3/activity/watching/#stop-watching-a-repository-legacy
126
126
  def unwatch(repo, options = {})
127
127
  boolean_from_response :delete, "user/watched/#{Repository.new(repo)}", options
128
128
  end
@@ -131,7 +131,7 @@ module Octokit
131
131
  #
132
132
  # @param repo [String, Hash, Repository] A GitHub repository
133
133
  # @return [Sawyer::Resource] Repository info for the new fork
134
- # @see http://developer.github.com/v3/repos/forks/#create-a-fork
134
+ # @see https://developer.github.com/v3/repos/forks/#create-a-fork
135
135
  def fork(repo, options = {})
136
136
  post "repos/#{Repository.new(repo)}/forks", options
137
137
  end
@@ -150,7 +150,7 @@ module Octokit
150
150
  # @option options [Boolean] :auto_init `true` to create an initial commit with empty README. Default is `false`.
151
151
  # @option options [String] :gitignore_template Desired language or platform .gitignore template to apply. Ignored if auto_init parameter is not provided.
152
152
  # @return [Sawyer::Resource] Repository info for the new repository
153
- # @see http://developer.github.com/v3/repos/#create
153
+ # @see https://developer.github.com/v3/repos/#create
154
154
  def create_repository(name, options = {})
155
155
  organization = options.delete :organization
156
156
  options.merge! :name => name
@@ -168,7 +168,7 @@ module Octokit
168
168
  #
169
169
  # Note: If OAuth is used, 'delete_repo' scope is required
170
170
  #
171
- # @see http://developer.github.com/v3/repos/#delete-a-repository
171
+ # @see https://developer.github.com/v3/repos/#delete-a-repository
172
172
  # @param repo [String, Hash, Repository] A GitHub repository
173
173
  # @return [Boolean] `true` if repository was deleted
174
174
  def delete_repository(repo, options = {})
@@ -200,7 +200,7 @@ module Octokit
200
200
  #
201
201
  # @param repo [String, Hash, Repository] A GitHub repository
202
202
  # @return [Array<Sawyer::Resource>] Array of hashes representing deploy keys.
203
- # @see http://developer.github.com/v3/repos/keys/#list
203
+ # @see https://developer.github.com/v3/repos/keys/#list
204
204
  # @example
205
205
  # @client.deploy_keys('octokit/octokit.rb')
206
206
  # @example
@@ -215,7 +215,7 @@ module Octokit
215
215
  # @param repo [String, Hash, Repository] A GitHub repository.
216
216
  # @param id [Integer] Deploy key ID.
217
217
  # @return [Sawyer::Resource] Deploy key.
218
- # @see http://developer.github.com/v3/repos/keys/#get
218
+ # @see https://developer.github.com/v3/repos/keys/#get
219
219
  # @example
220
220
  # @client.deploy_key('octokit/octokit.rb', 8675309)
221
221
  def deploy_key(repo, id, options={})
@@ -230,7 +230,7 @@ module Octokit
230
230
  # @param title [String] Title reference for the deploy key.
231
231
  # @param key [String] Public key.
232
232
  # @return [Sawyer::Resource] Hash representing newly added key.
233
- # @see http://developer.github.com/v3/repos/keys/#create
233
+ # @see https://developer.github.com/v3/repos/keys/#create
234
234
  # @example
235
235
  # @client.add_deploy_key('octokit/octokit.rb', 'Staging server', 'ssh-rsa AAA...')
236
236
  def add_deploy_key(repo, title, key, options = {})
@@ -245,7 +245,7 @@ module Octokit
245
245
  # @option title [String] Key title.
246
246
  # @option key [String] Public key.
247
247
  # @return [Sawyer::Resource] Updated deploy key.
248
- # @see http://developer.github.com/v3/repos/keys/#edit
248
+ # @see https://developer.github.com/v3/repos/keys/#edit
249
249
  # @example Update the key for a deploy key.
250
250
  # @client.edit_deploy_key('octokit/octokit.rb', 8675309, :key => 'ssh-rsa BBB...')
251
251
  # @example
@@ -262,7 +262,7 @@ module Octokit
262
262
  # @param repo [String, Hash, Repository] A GitHub repository.
263
263
  # @param id [Integer] Id of the deploy key to remove.
264
264
  # @return [Boolean] True if key removed, false otherwise.
265
- # @see http://developer.github.com/v3/repos/keys/#delete
265
+ # @see https://developer.github.com/v3/repos/keys/#delete
266
266
  # @example
267
267
  # @client.remove_deploy_key('octokit/octokit.rb', 100000)
268
268
  def remove_deploy_key(repo, id, options = {})
@@ -275,7 +275,7 @@ module Octokit
275
275
  #
276
276
  # @param repo [String, Hash, Repository] A GitHub repository.
277
277
  # @return [Array<Sawyer::Resource>] Array of hashes representing collaborating users.
278
- # @see http://developer.github.com/v3/repos/collaborators/#list
278
+ # @see https://developer.github.com/v3/repos/collaborators/#list
279
279
  # @example
280
280
  # Octokit.collaborators('octokit/octokit.rb')
281
281
  # @example
@@ -294,7 +294,7 @@ module Octokit
294
294
  # @param repo [String, Hash, Repository] A GitHub repository.
295
295
  # @param collaborator [String] Collaborator GitHub username to add.
296
296
  # @return [Boolean] True if collaborator added, false otherwise.
297
- # @see http://developer.github.com/v3/repos/collaborators/#add-collaborator
297
+ # @see https://developer.github.com/v3/repos/collaborators/#add-collaborator
298
298
  # @example
299
299
  # @client.add_collaborator('octokit/octokit.rb', 'holman')
300
300
  # @example
@@ -311,7 +311,7 @@ module Octokit
311
311
  # @param repo [String, Hash, Repository] A GitHub repository.
312
312
  # @param collaborator [String] Collaborator GitHub username to remove.
313
313
  # @return [Boolean] True if collaborator removed, false otherwise.
314
- # @see http://developer.github.com/v3/repos/collaborators/#remove-collaborator
314
+ # @see https://developer.github.com/v3/repos/collaborators/#remove-collaborator
315
315
  # @example
316
316
  # @client.remove_collaborator('octokit/octokit.rb', 'holman')
317
317
  # @example
@@ -328,7 +328,7 @@ module Octokit
328
328
  # @param repo [String, Hash, Repository] A GitHub repository.
329
329
  # @param collaborator [String] Collaborator GitHub username to check.
330
330
  # @return [Boolean] True if user is a collaborator, false otherwise.
331
- # @see http://developer.github.com/v3/repos/collaborators/#get
331
+ # @see https://developer.github.com/v3/repos/collaborators/#get
332
332
  # @example
333
333
  # @client.collaborator?('octokit/octokit.rb', 'holman')
334
334
  def collaborator?(repo, collaborator, options={})
@@ -341,7 +341,7 @@ module Octokit
341
341
  #
342
342
  # @param repo [String, Hash, Repository] A GitHub repository.
343
343
  # @return [Array<Sawyer::Resource>] Array of hashes representing teams.
344
- # @see http://developer.github.com/v3/repos/#list-teams
344
+ # @see https://developer.github.com/v3/repos/#list-teams
345
345
  # @example
346
346
  # @client.repository_teams('octokit/pengwynn')
347
347
  # @example
@@ -361,7 +361,7 @@ module Octokit
361
361
  # @param repo [String, Hash, Repository] A GitHub repository.
362
362
  # @param anon [Boolean] Set true to include annonymous contributors.
363
363
  # @return [Array<Sawyer::Resource>] Array of hashes representing users.
364
- # @see http://developer.github.com/v3/repos/#list-contributors
364
+ # @see https://developer.github.com/v3/repos/#list-contributors
365
365
  # @example
366
366
  # Octokit.contributors('octokit/octokit.rb', true)
367
367
  # @example
@@ -380,7 +380,7 @@ module Octokit
380
380
  #
381
381
  # @param repo [String, Hash, Repository] A GitHub repository.
382
382
  # @return [Array<Sawyer::Resource>] Array of hashes representing users.
383
- # @see http://developer.github.com/v3/activity/starring/#list-stargazers
383
+ # @see https://developer.github.com/v3/activity/starring/#list-stargazers
384
384
  # @example
385
385
  # Octokit.stargazers('octokit/octokit.rb')
386
386
  # @example
@@ -397,7 +397,7 @@ module Octokit
397
397
  #
398
398
  # @param repo [String, Hash, Repository] A GitHub repository.
399
399
  # @return [Array<Sawyer::Resource>] Array of hashes representing users.
400
- # @see http://developer.github.com/v3/repos/watching/#list-watchers
400
+ # @see https://developer.github.com/v3/repos/watching/#list-watchers
401
401
  # @example
402
402
  # Octokit.watchers('octokit/octokit.rb')
403
403
  # @example
@@ -412,7 +412,7 @@ module Octokit
412
412
  #
413
413
  # @param repo [String, Hash, Repository] A GitHub repository.
414
414
  # @return [Array<Sawyer::Resource>] Array of hashes representing repos.
415
- # @see http://developer.github.com/v3/repos/forks/#list-forks
415
+ # @see https://developer.github.com/v3/repos/forks/#list-forks
416
416
  # @example
417
417
  # Octokit.forks('octokit/octokit.rb')
418
418
  # @example
@@ -430,7 +430,7 @@ module Octokit
430
430
  #
431
431
  # @param repo [String, Hash, Repository] A GitHub repository.
432
432
  # @return [Array<Sawyer::Resource>] Array of Hashes representing languages.
433
- # @see http://developer.github.com/v3/repos/#list-languages
433
+ # @see https://developer.github.com/v3/repos/#list-languages
434
434
  # @example
435
435
  # Octokit.langauges('octokit/octokit.rb')
436
436
  # @example
@@ -445,7 +445,7 @@ module Octokit
445
445
  #
446
446
  # @param repo [String, Hash, Repository] A GitHub repository.
447
447
  # @return [Array<Sawyer::Resource>] Array of hashes representing tags.
448
- # @see http://developer.github.com/v3/repos/#list-tags
448
+ # @see https://developer.github.com/v3/repos/#list-tags
449
449
  # @example
450
450
  # Octokit.tags('octokit/octokit.rb')
451
451
  # @example
@@ -460,7 +460,7 @@ module Octokit
460
460
  #
461
461
  # @param repo [String, Hash, Repository] A GitHub repository.
462
462
  # @return [Array<Sawyer::Resource>] Array of hashes representing branches.
463
- # @see http://developer.github.com/v3/repos/#list-branches
463
+ # @see https://developer.github.com/v3/repos/#list-branches
464
464
  # @example
465
465
  # Octokit.branches('octokit/octokit.rb')
466
466
  # @example
@@ -474,7 +474,7 @@ module Octokit
474
474
  # @param repo [String, Hash, Repository] A GitHub repository.
475
475
  # @param branch [String] Branch name
476
476
  # @return [Sawyer::Resource] The branch requested, if it exists
477
- # @see http://developer.github.com/v3/repos/#get-branch
477
+ # @see https://developer.github.com/v3/repos/#get-branch
478
478
  # @example Get branch 'master` from octokit/octokit.rb
479
479
  # Octokit.branch("octokit/octokit.rb", "master")
480
480
  def branch(repo, branch, options = {})
@@ -488,7 +488,7 @@ module Octokit
488
488
  #
489
489
  # @param repo [String, Hash, Repository] A GitHub repository.
490
490
  # @return [Array<Sawyer::Resource>] Array of hashes representing hooks.
491
- # @see http://developer.github.com/v3/repos/hooks/#list-hooks
491
+ # @see https://developer.github.com/v3/repos/hooks/#list-hooks
492
492
  # @example
493
493
  # @client.hooks('octokit/octokit.rb')
494
494
  def hooks(repo, options = {})
@@ -502,7 +502,7 @@ module Octokit
502
502
  # @param repo [String, Hash, Repository] A GitHub repository.
503
503
  # @param id [Integer] Id of the hook to get.
504
504
  # @return [Sawyer::Resource] Hash representing hook.
505
- # @see http://developer.github.com/v3/repos/hooks/#get-single-hook
505
+ # @see https://developer.github.com/v3/repos/hooks/#get-single-hook
506
506
  # @example
507
507
  # @client.hook('octokit/octokit.rb', 100000)
508
508
  def hook(repo, id, options = {})
@@ -526,7 +526,7 @@ module Octokit
526
526
  # @return [Sawyer::Resource] Hook info for the new hook
527
527
  # @see https://api.github.com/hooks
528
528
  # @see https://github.com/github/github-services
529
- # @see http://developer.github.com/v3/repos/hooks/#create-a-hook
529
+ # @see https://developer.github.com/v3/repos/hooks/#create-a-hook
530
530
  # @example
531
531
  # @client.create_hook(
532
532
  # 'octokit/octokit.rb',
@@ -567,7 +567,7 @@ module Octokit
567
567
  # @return [Sawyer::Resource] Hook info for the updated hook
568
568
  # @see https://api.github.com/hooks
569
569
  # @see https://github.com/github/github-services
570
- # @see http://developer.github.com/v3/repos/hooks/#edit-a-hook
570
+ # @see https://developer.github.com/v3/repos/hooks/#edit-a-hook
571
571
  # @example
572
572
  # @client.edit_hook(
573
573
  # 'octokit/octokit.rb',
@@ -595,7 +595,7 @@ module Octokit
595
595
  # @param repo [String, Hash, Repository] A GitHub repository.
596
596
  # @param id [Integer] Id of the hook to remove.
597
597
  # @return [Boolean] True if hook removed, false otherwise.
598
- # @see http://developer.github.com/v3/repos/hooks/#delete-a-hook
598
+ # @see https://developer.github.com/v3/repos/hooks/#delete-a-hook
599
599
  # @example
600
600
  # @client.remove_hook('octokit/octokit.rb', 1000000)
601
601
  def remove_hook(repo, id, options = {})
@@ -609,7 +609,7 @@ module Octokit
609
609
  # @param repo [String, Hash, Repository] A GitHub repository.
610
610
  # @param id [Integer] Id of the hook to test.
611
611
  # @return [Boolean] Success
612
- # @see http://developer.github.com/v3/repos/hooks/#test-a-push-hook
612
+ # @see https://developer.github.com/v3/repos/hooks/#test-a-push-hook
613
613
  # @example
614
614
  # @client.test_hook('octokit/octokit.rb', 1000000)
615
615
  def test_hook(repo, id, options = {})
@@ -622,7 +622,7 @@ module Octokit
622
622
  #
623
623
  # @param repo [String, Hash, Repository] A GitHub repository.
624
624
  # @return [Array<Sawyer::Resource>] Array of hashes representing users.
625
- # @see http://developer.github.com/v3/issues/assignees/#list-assignees
625
+ # @see https://developer.github.com/v3/issues/assignees/#list-assignees
626
626
  # @example
627
627
  # Octokit.repository_assignees('octokit/octokit.rb')
628
628
  # @example
@@ -639,7 +639,7 @@ module Octokit
639
639
  # @param repo [String, Hash, Repository] A GitHub repository.
640
640
  # @param assignee [String] User login to check
641
641
  # @return [Boolean] True if assignable on project, false otherwise.
642
- # @see http://developer.github.com/v3/issues/assignees/#check-assignee
642
+ # @see https://developer.github.com/v3/issues/assignees/#check-assignee
643
643
  # @example
644
644
  # Octokit.check_assignee('octokit/octokit.rb', 'andrew')
645
645
  def check_assignee(repo, assignee, options = {})
@@ -650,7 +650,7 @@ module Octokit
650
650
  #
651
651
  # @param repo [String, Hash, Repository] A GitHub repository.
652
652
  # @return [Array<Sawyer::Resource>] Array of users watching.
653
- # @see http://developer.github.com/v3/activity/watching/#list-watchers
653
+ # @see https://developer.github.com/v3/activity/watching/#list-watchers
654
654
  # @example
655
655
  # @client.subscribers("octokit/octokit.rb")
656
656
  def subscribers(repo, options = {})
@@ -661,7 +661,7 @@ module Octokit
661
661
  #
662
662
  # @param repo [String, Hash, Repository] A GitHub repository.
663
663
  # @return [Sawyer::Resource] Repository subscription.
664
- # @see http://developer.github.com/v3/activity/watching/#get-a-repository-subscription
664
+ # @see https://developer.github.com/v3/activity/watching/#get-a-repository-subscription
665
665
  # @example
666
666
  # @client.subscription("octokit/octokit.rb")
667
667
  def subscription(repo, options = {})
@@ -678,7 +678,7 @@ module Octokit
678
678
  # @option options [Boolean] :ignored Deterimines if all notifications
679
679
  # should be blocked from this repository.
680
680
  # @return [Sawyer::Resource] Updated repository subscription.
681
- # @see http://developer.github.com/v3/activity/watching/#set-a-repository-subscription
681
+ # @see https://developer.github.com/v3/activity/watching/#set-a-repository-subscription
682
682
  # @example Subscribe to notifications for a repository
683
683
  # @client.update_subscription("octokit/octokit.rb", {subscribed: true})
684
684
  def update_subscription(repo, options = {})
@@ -689,7 +689,7 @@ module Octokit
689
689
  #
690
690
  # @param repo [String, Hash, Repository] A GitHub repository.
691
691
  # @return [Boolean] True if subscription deleted, false otherwise.
692
- # @see http://developer.github.com/v3/activity/watching/#delete-a-repository-subscription
692
+ # @see https://developer.github.com/v3/activity/watching/#delete-a-repository-subscription
693
693
  #
694
694
  # @example
695
695
  # @client.delete_subscription("octokit/octokit.rb")