mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 02:46:04 +01:00 
			
		
		
		
	Update github.com/google/go-github to v52 (#24004)
based on https://github.com/google/go-github/pull/2743 because of https://github.com/go-gitea/gitea/pull/23946#discussion_r1160317554 --------- Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
		| @@ -20,7 +20,7 @@ import ( | ||||
| 	"code.gitea.io/gitea/modules/proxy" | ||||
| 	"code.gitea.io/gitea/modules/structs" | ||||
|  | ||||
| 	"github.com/google/go-github/v51/github" | ||||
| 	"github.com/google/go-github/v52/github" | ||||
| 	"golang.org/x/oauth2" | ||||
| ) | ||||
|  | ||||
| @@ -256,11 +256,11 @@ func (g *GithubDownloaderV3) GetMilestones() ([]*base.Milestone, error) { | ||||
| 			milestones = append(milestones, &base.Milestone{ | ||||
| 				Title:       m.GetTitle(), | ||||
| 				Description: m.GetDescription(), | ||||
| 				Deadline:    convertGithubTimestampToTime(m.DueOn), | ||||
| 				Deadline:    m.DueOn.GetTime(), | ||||
| 				State:       state, | ||||
| 				Created:     m.GetCreatedAt().Time, | ||||
| 				Updated:     convertGithubTimestampToTime(m.UpdatedAt), | ||||
| 				Closed:      convertGithubTimestampToTime(m.ClosedAt), | ||||
| 				Updated:     m.UpdatedAt.GetTime(), | ||||
| 				Closed:      m.ClosedAt.GetTime(), | ||||
| 			}) | ||||
| 		} | ||||
| 		if len(ms) < perPage { | ||||
| @@ -715,11 +715,11 @@ func (g *GithubDownloaderV3) GetPullRequests(page, perPage int) ([]*base.PullReq | ||||
| 			State:          pr.GetState(), | ||||
| 			Created:        pr.GetCreatedAt().Time, | ||||
| 			Updated:        pr.GetUpdatedAt().Time, | ||||
| 			Closed:         convertGithubTimestampToTime(pr.ClosedAt), | ||||
| 			Closed:         pr.ClosedAt.GetTime(), | ||||
| 			Labels:         labels, | ||||
| 			Merged:         pr.MergedAt != nil, | ||||
| 			MergeCommitSHA: pr.GetMergeCommitSHA(), | ||||
| 			MergedTime:     convertGithubTimestampToTime(pr.MergedAt), | ||||
| 			MergedTime:     pr.MergedAt.GetTime(), | ||||
| 			IsLocked:       pr.ActiveLockReason != nil, | ||||
| 			Head: base.PullRequestBranch{ | ||||
| 				Ref:       pr.GetHead().GetRef(), | ||||
| @@ -878,10 +878,3 @@ func (g *GithubDownloaderV3) GetReviews(reviewable base.Reviewable) ([]*base.Rev | ||||
| 	} | ||||
| 	return allReviews, nil | ||||
| } | ||||
|  | ||||
| func convertGithubTimestampToTime(t *github.Timestamp) *time.Time { | ||||
| 	if t == nil { | ||||
| 		return nil | ||||
| 	} | ||||
| 	return &t.Time | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user