Skip to content

Commit 82629e0

Browse files
kevinburkedmitshur
authored andcommitted
Use HTTPS for all developer.github.com links. (#551)
Avoids a redirect and possible tampering.
1 parent dfd20fd commit 82629e0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+175
-175
lines changed

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ documentation, following the format `{service}_{api}.go`. For example, methods
7070
defined at <https://developer.github.com/v3/repos/hooks/> live in
7171
[repos_hooks.go][].
7272

73-
[GitHub API documentation]: http://developer.github.com/v3/
73+
[GitHub API documentation]: https://developer.github.com/v3/
7474
[repos_hooks.go]: https://github.com/google/go-github/blob/master/github/repos_hooks.go
7575

7676

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2929
----------
3030

3131
Some documentation is taken from the GitHub Developer site
32-
<http://developer.github.com/>, which is available under the following Creative
32+
<https://developer.github.com/>, which is available under the following Creative
3333
Commons Attribution 3.0 License. This applies only to the go-github source
3434
code and would not apply to any compiled binaries.
3535

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ repos, _, err := client.Repositories.ListByOrg("github", opt)
3737

3838
The services of a client divide the API into logical chunks and correspond to
3939
the structure of the GitHub API documentation at
40-
http://developer.github.com/v3/.
40+
https://developer.github.com/v3/.
4141

4242
### Authentication ###
4343

@@ -97,7 +97,7 @@ if _, ok := err.(*github.RateLimitError); ok {
9797
```
9898

9999
Learn more about GitHub rate limiting at
100-
http://developer.github.com/v3/#rate-limiting.
100+
https://developer.github.com/v3/#rate-limiting.
101101

102102
### Accepted Status ###
103103

github/activity.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ package github
88
// ActivityService handles communication with the activity related
99
// methods of the GitHub API.
1010
//
11-
// GitHub API docs: http://developer.github.com/v3/activity/
11+
// GitHub API docs: https://developer.github.com/v3/activity/
1212
type ActivityService service
1313

1414
// FeedLink represents a link to a related resource.

github/activity_events.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ func (e *Event) Payload() (payload interface{}) {
9898

9999
// ListEvents drinks from the firehose of all public events across GitHub.
100100
//
101-
// GitHub API docs: http://developer.github.com/v3/activity/events/#list-public-events
101+
// GitHub API docs: https://developer.github.com/v3/activity/events/#list-public-events
102102
func (s *ActivityService) ListEvents(opt *ListOptions) ([]*Event, *Response, error) {
103103
u, err := addOptions("events", opt)
104104
if err != nil {
@@ -121,7 +121,7 @@ func (s *ActivityService) ListEvents(opt *ListOptions) ([]*Event, *Response, err
121121

122122
// ListRepositoryEvents lists events for a repository.
123123
//
124-
// GitHub API docs: http://developer.github.com/v3/activity/events/#list-repository-events
124+
// GitHub API docs: https://developer.github.com/v3/activity/events/#list-repository-events
125125
func (s *ActivityService) ListRepositoryEvents(owner, repo string, opt *ListOptions) ([]*Event, *Response, error) {
126126
u := fmt.Sprintf("repos/%v/%v/events", owner, repo)
127127
u, err := addOptions(u, opt)
@@ -145,7 +145,7 @@ func (s *ActivityService) ListRepositoryEvents(owner, repo string, opt *ListOpti
145145

146146
// ListIssueEventsForRepository lists issue events for a repository.
147147
//
148-
// GitHub API docs: http://developer.github.com/v3/activity/events/#list-issue-events-for-a-repository
148+
// GitHub API docs: https://developer.github.com/v3/activity/events/#list-issue-events-for-a-repository
149149
func (s *ActivityService) ListIssueEventsForRepository(owner, repo string, opt *ListOptions) ([]*IssueEvent, *Response, error) {
150150
u := fmt.Sprintf("repos/%v/%v/issues/events", owner, repo)
151151
u, err := addOptions(u, opt)
@@ -169,7 +169,7 @@ func (s *ActivityService) ListIssueEventsForRepository(owner, repo string, opt *
169169

170170
// ListEventsForRepoNetwork lists public events for a network of repositories.
171171
//
172-
// GitHub API docs: http://developer.github.com/v3/activity/events/#list-public-events-for-a-network-of-repositories
172+
// GitHub API docs: https://developer.github.com/v3/activity/events/#list-public-events-for-a-network-of-repositories
173173
func (s *ActivityService) ListEventsForRepoNetwork(owner, repo string, opt *ListOptions) ([]*Event, *Response, error) {
174174
u := fmt.Sprintf("networks/%v/%v/events", owner, repo)
175175
u, err := addOptions(u, opt)
@@ -193,7 +193,7 @@ func (s *ActivityService) ListEventsForRepoNetwork(owner, repo string, opt *List
193193

194194
// ListEventsForOrganization lists public events for an organization.
195195
//
196-
// GitHub API docs: http://developer.github.com/v3/activity/events/#list-public-events-for-an-organization
196+
// GitHub API docs: https://developer.github.com/v3/activity/events/#list-public-events-for-an-organization
197197
func (s *ActivityService) ListEventsForOrganization(org string, opt *ListOptions) ([]*Event, *Response, error) {
198198
u := fmt.Sprintf("orgs/%v/events", org)
199199
u, err := addOptions(u, opt)
@@ -218,7 +218,7 @@ func (s *ActivityService) ListEventsForOrganization(org string, opt *ListOptions
218218
// ListEventsPerformedByUser lists the events performed by a user. If publicOnly is
219219
// true, only public events will be returned.
220220
//
221-
// GitHub API docs: http://developer.github.com/v3/activity/events/#list-events-performed-by-a-user
221+
// GitHub API docs: https://developer.github.com/v3/activity/events/#list-events-performed-by-a-user
222222
func (s *ActivityService) ListEventsPerformedByUser(user string, publicOnly bool, opt *ListOptions) ([]*Event, *Response, error) {
223223
var u string
224224
if publicOnly {
@@ -248,7 +248,7 @@ func (s *ActivityService) ListEventsPerformedByUser(user string, publicOnly bool
248248
// ListEventsReceivedByUser lists the events received by a user. If publicOnly is
249249
// true, only public events will be returned.
250250
//
251-
// GitHub API docs: http://developer.github.com/v3/activity/events/#list-events-that-a-user-has-received
251+
// GitHub API docs: https://developer.github.com/v3/activity/events/#list-events-that-a-user-has-received
252252
func (s *ActivityService) ListEventsReceivedByUser(user string, publicOnly bool, opt *ListOptions) ([]*Event, *Response, error) {
253253
var u string
254254
if publicOnly {
@@ -278,7 +278,7 @@ func (s *ActivityService) ListEventsReceivedByUser(user string, publicOnly bool,
278278
// ListUserEventsForOrganization provides the user’s organization dashboard. You
279279
// must be authenticated as the user to view this.
280280
//
281-
// GitHub API docs: http://developer.github.com/v3/activity/events/#list-events-for-an-organization
281+
// GitHub API docs: https://developer.github.com/v3/activity/events/#list-events-for-an-organization
282282
func (s *ActivityService) ListUserEventsForOrganization(org, user string, opt *ListOptions) ([]*Event, *Response, error) {
283283
u := fmt.Sprintf("users/%v/events/orgs/%v", user, org)
284284
u, err := addOptions(u, opt)

github/activity_star.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ type ActivityListStarredOptions struct {
6363
// ListStarred lists all the repos starred by a user. Passing the empty string
6464
// will list the starred repositories for the authenticated user.
6565
//
66-
// GitHub API docs: http://developer.github.com/v3/activity/starring/#list-repositories-being-starred
66+
// GitHub API docs: https://developer.github.com/v3/activity/starring/#list-repositories-being-starred
6767
func (s *ActivityService) ListStarred(user string, opt *ActivityListStarredOptions) ([]*StarredRepository, *Response, error) {
6868
var u string
6969
if user != "" {

github/activity_watching.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ type Subscription struct {
2424

2525
// ListWatchers lists watchers of a particular repo.
2626
//
27-
// GitHub API Docs: http://developer.github.com/v3/activity/watching/#list-watchers
27+
// GitHub API Docs: https://developer.github.com/v3/activity/watching/#list-watchers
2828
func (s *ActivityService) ListWatchers(owner, repo string, opt *ListOptions) ([]*User, *Response, error) {
2929
u := fmt.Sprintf("repos/%s/%s/subscribers", owner, repo)
3030
u, err := addOptions(u, opt)

github/doc.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Some API methods have optional parameters that can be passed. For example:
2828
2929
The services of a client divide the API into logical chunks and correspond to
3030
the structure of the GitHub API documentation at
31-
http://developer.github.com/v3/.
31+
https://developer.github.com/v3/.
3232
3333
Authentication
3434
@@ -84,7 +84,7 @@ To detect an API rate limit error, you can check if its type is *github.RateLimi
8484
}
8585
8686
Learn more about GitHub rate limiting at
87-
http://developer.github.com/v3/#rate-limiting.
87+
https://developer.github.com/v3/#rate-limiting.
8888
8989
Accepted Status
9090

github/event_types.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ type PullRequestReviewCommentEvent struct {
421421

422422
// PushEvent represents a git push to a GitHub repository.
423423
//
424-
// GitHub API docs: http://developer.github.com/v3/activity/events/types/#pushevent
424+
// GitHub API docs: https://developer.github.com/v3/activity/events/types/#pushevent
425425
type PushEvent struct {
426426
PushID *int `json:"push_id,omitempty"`
427427
Head *string `json:"head,omitempty"`

github/gists.go

+12-12
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
// GistsService handles communication with the Gist related
1414
// methods of the GitHub API.
1515
//
16-
// GitHub API docs: http://developer.github.com/v3/gists/
16+
// GitHub API docs: https://developer.github.com/v3/gists/
1717
type GistsService service
1818

1919
// Gist represents a GitHub's gist.
@@ -92,7 +92,7 @@ type GistListOptions struct {
9292
// is authenticated, it will returns all gists for the authenticated
9393
// user.
9494
//
95-
// GitHub API docs: http://developer.github.com/v3/gists/#list-gists
95+
// GitHub API docs: https://developer.github.com/v3/gists/#list-gists
9696
func (s *GistsService) List(user string, opt *GistListOptions) ([]*Gist, *Response, error) {
9797
var u string
9898
if user != "" {
@@ -121,7 +121,7 @@ func (s *GistsService) List(user string, opt *GistListOptions) ([]*Gist, *Respon
121121

122122
// ListAll lists all public gists.
123123
//
124-
// GitHub API docs: http://developer.github.com/v3/gists/#list-gists
124+
// GitHub API docs: https://developer.github.com/v3/gists/#list-gists
125125
func (s *GistsService) ListAll(opt *GistListOptions) ([]*Gist, *Response, error) {
126126
u, err := addOptions("gists/public", opt)
127127
if err != nil {
@@ -144,7 +144,7 @@ func (s *GistsService) ListAll(opt *GistListOptions) ([]*Gist, *Response, error)
144144

145145
// ListStarred lists starred gists of authenticated user.
146146
//
147-
// GitHub API docs: http://developer.github.com/v3/gists/#list-gists
147+
// GitHub API docs: https://developer.github.com/v3/gists/#list-gists
148148
func (s *GistsService) ListStarred(opt *GistListOptions) ([]*Gist, *Response, error) {
149149
u, err := addOptions("gists/starred", opt)
150150
if err != nil {
@@ -167,7 +167,7 @@ func (s *GistsService) ListStarred(opt *GistListOptions) ([]*Gist, *Response, er
167167

168168
// Get a single gist.
169169
//
170-
// GitHub API docs: http://developer.github.com/v3/gists/#get-a-single-gist
170+
// GitHub API docs: https://developer.github.com/v3/gists/#get-a-single-gist
171171
func (s *GistsService) Get(id string) (*Gist, *Response, error) {
172172
u := fmt.Sprintf("gists/%v", id)
173173
req, err := s.client.NewRequest("GET", u, nil)
@@ -203,7 +203,7 @@ func (s *GistsService) GetRevision(id, sha string) (*Gist, *Response, error) {
203203

204204
// Create a gist for authenticated user.
205205
//
206-
// GitHub API docs: http://developer.github.com/v3/gists/#create-a-gist
206+
// GitHub API docs: https://developer.github.com/v3/gists/#create-a-gist
207207
func (s *GistsService) Create(gist *Gist) (*Gist, *Response, error) {
208208
u := "gists"
209209
req, err := s.client.NewRequest("POST", u, gist)
@@ -221,7 +221,7 @@ func (s *GistsService) Create(gist *Gist) (*Gist, *Response, error) {
221221

222222
// Edit a gist.
223223
//
224-
// GitHub API docs: http://developer.github.com/v3/gists/#edit-a-gist
224+
// GitHub API docs: https://developer.github.com/v3/gists/#edit-a-gist
225225
func (s *GistsService) Edit(id string, gist *Gist) (*Gist, *Response, error) {
226226
u := fmt.Sprintf("gists/%v", id)
227227
req, err := s.client.NewRequest("PATCH", u, gist)
@@ -258,7 +258,7 @@ func (s *GistsService) ListCommits(id string) ([]*GistCommit, *Response, error)
258258

259259
// Delete a gist.
260260
//
261-
// GitHub API docs: http://developer.github.com/v3/gists/#delete-a-gist
261+
// GitHub API docs: https://developer.github.com/v3/gists/#delete-a-gist
262262
func (s *GistsService) Delete(id string) (*Response, error) {
263263
u := fmt.Sprintf("gists/%v", id)
264264
req, err := s.client.NewRequest("DELETE", u, nil)
@@ -270,7 +270,7 @@ func (s *GistsService) Delete(id string) (*Response, error) {
270270

271271
// Star a gist on behalf of authenticated user.
272272
//
273-
// GitHub API docs: http://developer.github.com/v3/gists/#star-a-gist
273+
// GitHub API docs: https://developer.github.com/v3/gists/#star-a-gist
274274
func (s *GistsService) Star(id string) (*Response, error) {
275275
u := fmt.Sprintf("gists/%v/star", id)
276276
req, err := s.client.NewRequest("PUT", u, nil)
@@ -282,7 +282,7 @@ func (s *GistsService) Star(id string) (*Response, error) {
282282

283283
// Unstar a gist on a behalf of authenticated user.
284284
//
285-
// Github API docs: http://developer.github.com/v3/gists/#unstar-a-gist
285+
// Github API docs: https://developer.github.com/v3/gists/#unstar-a-gist
286286
func (s *GistsService) Unstar(id string) (*Response, error) {
287287
u := fmt.Sprintf("gists/%v/star", id)
288288
req, err := s.client.NewRequest("DELETE", u, nil)
@@ -294,7 +294,7 @@ func (s *GistsService) Unstar(id string) (*Response, error) {
294294

295295
// IsStarred checks if a gist is starred by authenticated user.
296296
//
297-
// GitHub API docs: http://developer.github.com/v3/gists/#check-if-a-gist-is-starred
297+
// GitHub API docs: https://developer.github.com/v3/gists/#check-if-a-gist-is-starred
298298
func (s *GistsService) IsStarred(id string) (bool, *Response, error) {
299299
u := fmt.Sprintf("gists/%v/star", id)
300300
req, err := s.client.NewRequest("GET", u, nil)
@@ -308,7 +308,7 @@ func (s *GistsService) IsStarred(id string) (bool, *Response, error) {
308308

309309
// Fork a gist.
310310
//
311-
// GitHub API docs: http://developer.github.com/v3/gists/#fork-a-gist
311+
// GitHub API docs: https://developer.github.com/v3/gists/#fork-a-gist
312312
func (s *GistsService) Fork(id string) (*Gist, *Response, error) {
313313
u := fmt.Sprintf("gists/%v/forks", id)
314314
req, err := s.client.NewRequest("POST", u, nil)

github/gists_comments.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func (g GistComment) String() string {
2525

2626
// ListComments lists all comments for a gist.
2727
//
28-
// GitHub API docs: http://developer.github.com/v3/gists/comments/#list-comments-on-a-gist
28+
// GitHub API docs: https://developer.github.com/v3/gists/comments/#list-comments-on-a-gist
2929
func (s *GistsService) ListComments(gistID string, opt *ListOptions) ([]*GistComment, *Response, error) {
3030
u := fmt.Sprintf("gists/%v/comments", gistID)
3131
u, err := addOptions(u, opt)
@@ -49,7 +49,7 @@ func (s *GistsService) ListComments(gistID string, opt *ListOptions) ([]*GistCom
4949

5050
// GetComment retrieves a single comment from a gist.
5151
//
52-
// GitHub API docs: http://developer.github.com/v3/gists/comments/#get-a-single-comment
52+
// GitHub API docs: https://developer.github.com/v3/gists/comments/#get-a-single-comment
5353
func (s *GistsService) GetComment(gistID string, commentID int) (*GistComment, *Response, error) {
5454
u := fmt.Sprintf("gists/%v/comments/%v", gistID, commentID)
5555
req, err := s.client.NewRequest("GET", u, nil)
@@ -68,7 +68,7 @@ func (s *GistsService) GetComment(gistID string, commentID int) (*GistComment, *
6868

6969
// CreateComment creates a comment for a gist.
7070
//
71-
// GitHub API docs: http://developer.github.com/v3/gists/comments/#create-a-comment
71+
// GitHub API docs: https://developer.github.com/v3/gists/comments/#create-a-comment
7272
func (s *GistsService) CreateComment(gistID string, comment *GistComment) (*GistComment, *Response, error) {
7373
u := fmt.Sprintf("gists/%v/comments", gistID)
7474
req, err := s.client.NewRequest("POST", u, comment)
@@ -87,7 +87,7 @@ func (s *GistsService) CreateComment(gistID string, comment *GistComment) (*Gist
8787

8888
// EditComment edits an existing gist comment.
8989
//
90-
// GitHub API docs: http://developer.github.com/v3/gists/comments/#edit-a-comment
90+
// GitHub API docs: https://developer.github.com/v3/gists/comments/#edit-a-comment
9191
func (s *GistsService) EditComment(gistID string, commentID int, comment *GistComment) (*GistComment, *Response, error) {
9292
u := fmt.Sprintf("gists/%v/comments/%v", gistID, commentID)
9393
req, err := s.client.NewRequest("PATCH", u, comment)
@@ -106,7 +106,7 @@ func (s *GistsService) EditComment(gistID string, commentID int, comment *GistCo
106106

107107
// DeleteComment deletes a gist comment.
108108
//
109-
// GitHub API docs: http://developer.github.com/v3/gists/comments/#delete-a-comment
109+
// GitHub API docs: https://developer.github.com/v3/gists/comments/#delete-a-comment
110110
func (s *GistsService) DeleteComment(gistID string, commentID int) (*Response, error) {
111111
u := fmt.Sprintf("gists/%v/comments/%v", gistID, commentID)
112112
req, err := s.client.NewRequest("DELETE", u, nil)

github/git.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ package github
88
// GitService handles communication with the git data related
99
// methods of the GitHub API.
1010
//
11-
// GitHub API docs: http://developer.github.com/v3/git/
11+
// GitHub API docs: https://developer.github.com/v3/git/
1212
type GitService service

github/git_blobs.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ type Blob struct {
1818

1919
// GetBlob fetchs a blob from a repo given a SHA.
2020
//
21-
// GitHub API docs: http://developer.github.com/v3/git/blobs/#get-a-blob
21+
// GitHub API docs: https://developer.github.com/v3/git/blobs/#get-a-blob
2222
func (s *GitService) GetBlob(owner string, repo string, sha string) (*Blob, *Response, error) {
2323
u := fmt.Sprintf("repos/%v/%v/git/blobs/%v", owner, repo, sha)
2424
req, err := s.client.NewRequest("GET", u, nil)

github/git_commits.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func (c CommitAuthor) String() string {
5757

5858
// GetCommit fetchs the Commit object for a given SHA.
5959
//
60-
// GitHub API docs: http://developer.github.com/v3/git/commits/#get-a-commit
60+
// GitHub API docs: https://developer.github.com/v3/git/commits/#get-a-commit
6161
func (s *GitService) GetCommit(owner string, repo string, sha string) (*Commit, *Response, error) {
6262
u := fmt.Sprintf("repos/%v/%v/git/commits/%v", owner, repo, sha)
6363
req, err := s.client.NewRequest("GET", u, nil)
@@ -92,7 +92,7 @@ type createCommit struct {
9292
// data if omitted. If the commit.Author is omitted, it will be filled in with
9393
// the authenticated user’s information and the current date.
9494
//
95-
// GitHub API docs: http://developer.github.com/v3/git/commits/#create-a-commit
95+
// GitHub API docs: https://developer.github.com/v3/git/commits/#create-a-commit
9696
func (s *GitService) CreateCommit(owner string, repo string, commit *Commit) (*Commit, *Response, error) {
9797
u := fmt.Sprintf("repos/%v/%v/git/commits", owner, repo)
9898

0 commit comments

Comments
 (0)