Skip to content

Commit

Permalink
Use HTTPS for all developer.github.com links. (google#551)
Browse files Browse the repository at this point in the history
Avoids a redirect and possible tampering.
  • Loading branch information
kevinburke authored and dmitshur committed Feb 18, 2017
1 parent 7f29e5a commit 328a420
Show file tree
Hide file tree
Showing 42 changed files with 175 additions and 175 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ documentation, following the format `{service}_{api}.go`. For example, methods
defined at <https://developer.github.com/v3/repos/hooks/> live in
[repos_hooks.go][].

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


Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
----------

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

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ repos, _, err := client.Repositories.ListByOrg("github", opt)

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

### Authentication ###

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

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

### Accepted Status ###

Expand Down
2 changes: 1 addition & 1 deletion github/activity.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ package github
// ActivityService handles communication with the activity related
// methods of the GitHub API.
//
// GitHub API docs: http://developer.github.com/v3/activity/
// GitHub API docs: https://developer.github.com/v3/activity/
type ActivityService service

// FeedLink represents a link to a related resource.
Expand Down
16 changes: 8 additions & 8 deletions github/activity_events.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func (e *Event) Payload() (payload interface{}) {

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

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

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

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

// ListEventsForOrganization lists public events for an organization.
//
// GitHub API docs: http://developer.github.com/v3/activity/events/#list-public-events-for-an-organization
// GitHub API docs: https://developer.github.com/v3/activity/events/#list-public-events-for-an-organization
func (s *ActivityService) ListEventsForOrganization(org string, opt *ListOptions) ([]*Event, *Response, error) {
u := fmt.Sprintf("orgs/%v/events", org)
u, err := addOptions(u, opt)
Expand All @@ -218,7 +218,7 @@ func (s *ActivityService) ListEventsForOrganization(org string, opt *ListOptions
// ListEventsPerformedByUser lists the events performed by a user. If publicOnly is
// true, only public events will be returned.
//
// GitHub API docs: http://developer.github.com/v3/activity/events/#list-events-performed-by-a-user
// GitHub API docs: https://developer.github.com/v3/activity/events/#list-events-performed-by-a-user
func (s *ActivityService) ListEventsPerformedByUser(user string, publicOnly bool, opt *ListOptions) ([]*Event, *Response, error) {
var u string
if publicOnly {
Expand Down Expand Up @@ -248,7 +248,7 @@ func (s *ActivityService) ListEventsPerformedByUser(user string, publicOnly bool
// ListEventsReceivedByUser lists the events received by a user. If publicOnly is
// true, only public events will be returned.
//
// GitHub API docs: http://developer.github.com/v3/activity/events/#list-events-that-a-user-has-received
// GitHub API docs: https://developer.github.com/v3/activity/events/#list-events-that-a-user-has-received
func (s *ActivityService) ListEventsReceivedByUser(user string, publicOnly bool, opt *ListOptions) ([]*Event, *Response, error) {
var u string
if publicOnly {
Expand Down Expand Up @@ -278,7 +278,7 @@ func (s *ActivityService) ListEventsReceivedByUser(user string, publicOnly bool,
// ListUserEventsForOrganization provides the user’s organization dashboard. You
// must be authenticated as the user to view this.
//
// GitHub API docs: http://developer.github.com/v3/activity/events/#list-events-for-an-organization
// GitHub API docs: https://developer.github.com/v3/activity/events/#list-events-for-an-organization
func (s *ActivityService) ListUserEventsForOrganization(org, user string, opt *ListOptions) ([]*Event, *Response, error) {
u := fmt.Sprintf("users/%v/events/orgs/%v", user, org)
u, err := addOptions(u, opt)
Expand Down
2 changes: 1 addition & 1 deletion github/activity_star.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ type ActivityListStarredOptions struct {
// ListStarred lists all the repos starred by a user. Passing the empty string
// will list the starred repositories for the authenticated user.
//
// GitHub API docs: http://developer.github.com/v3/activity/starring/#list-repositories-being-starred
// GitHub API docs: https://developer.github.com/v3/activity/starring/#list-repositories-being-starred
func (s *ActivityService) ListStarred(user string, opt *ActivityListStarredOptions) ([]*StarredRepository, *Response, error) {
var u string
if user != "" {
Expand Down
2 changes: 1 addition & 1 deletion github/activity_watching.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type Subscription struct {

// ListWatchers lists watchers of a particular repo.
//
// GitHub API Docs: http://developer.github.com/v3/activity/watching/#list-watchers
// GitHub API Docs: https://developer.github.com/v3/activity/watching/#list-watchers
func (s *ActivityService) ListWatchers(owner, repo string, opt *ListOptions) ([]*User, *Response, error) {
u := fmt.Sprintf("repos/%s/%s/subscribers", owner, repo)
u, err := addOptions(u, opt)
Expand Down
4 changes: 2 additions & 2 deletions github/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Some API methods have optional parameters that can be passed. For example:
The services of a client divide the API into logical chunks and correspond to
the structure of the GitHub API documentation at
http://developer.github.com/v3/.
https://developer.github.com/v3/.
Authentication
Expand Down Expand Up @@ -84,7 +84,7 @@ To detect an API rate limit error, you can check if its type is *github.RateLimi
}
Learn more about GitHub rate limiting at
http://developer.github.com/v3/#rate-limiting.
https://developer.github.com/v3/#rate-limiting.
Accepted Status
Expand Down
2 changes: 1 addition & 1 deletion github/event_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ type PullRequestReviewCommentEvent struct {

// PushEvent represents a git push to a GitHub repository.
//
// GitHub API docs: http://developer.github.com/v3/activity/events/types/#pushevent
// GitHub API docs: https://developer.github.com/v3/activity/events/types/#pushevent
type PushEvent struct {
PushID *int `json:"push_id,omitempty"`
Head *string `json:"head,omitempty"`
Expand Down
24 changes: 12 additions & 12 deletions github/gists.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
// GistsService handles communication with the Gist related
// methods of the GitHub API.
//
// GitHub API docs: http://developer.github.com/v3/gists/
// GitHub API docs: https://developer.github.com/v3/gists/
type GistsService service

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

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

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

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

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

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

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

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

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

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

// Fork a gist.
//
// GitHub API docs: http://developer.github.com/v3/gists/#fork-a-gist
// GitHub API docs: https://developer.github.com/v3/gists/#fork-a-gist
func (s *GistsService) Fork(id string) (*Gist, *Response, error) {
u := fmt.Sprintf("gists/%v/forks", id)
req, err := s.client.NewRequest("POST", u, nil)
Expand Down
10 changes: 5 additions & 5 deletions github/gists_comments.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func (g GistComment) String() string {

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

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

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

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

// DeleteComment deletes a gist comment.
//
// GitHub API docs: http://developer.github.com/v3/gists/comments/#delete-a-comment
// GitHub API docs: https://developer.github.com/v3/gists/comments/#delete-a-comment
func (s *GistsService) DeleteComment(gistID string, commentID int) (*Response, error) {
u := fmt.Sprintf("gists/%v/comments/%v", gistID, commentID)
req, err := s.client.NewRequest("DELETE", u, nil)
Expand Down
2 changes: 1 addition & 1 deletion github/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ package github
// GitService handles communication with the git data related
// methods of the GitHub API.
//
// GitHub API docs: http://developer.github.com/v3/git/
// GitHub API docs: https://developer.github.com/v3/git/
type GitService service
2 changes: 1 addition & 1 deletion github/git_blobs.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type Blob struct {

// GetBlob fetchs a blob from a repo given a SHA.
//
// GitHub API docs: http://developer.github.com/v3/git/blobs/#get-a-blob
// GitHub API docs: https://developer.github.com/v3/git/blobs/#get-a-blob
func (s *GitService) GetBlob(owner string, repo string, sha string) (*Blob, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/git/blobs/%v", owner, repo, sha)
req, err := s.client.NewRequest("GET", u, nil)
Expand Down
4 changes: 2 additions & 2 deletions github/git_commits.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (c CommitAuthor) String() string {

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

Expand Down
Loading

0 comments on commit 328a420

Please sign in to comment.