@@ -14,11 +14,11 @@ import (
14
14
"code.gitea.io/gitea/modules/log"
15
15
base "code.gitea.io/gitea/modules/migration"
16
16
"code.gitea.io/gitea/modules/structs"
17
+ "code.gitea.io/gitea/modules/util"
17
18
18
19
"github.com/aws/aws-sdk-go-v2/credentials"
19
20
"github.com/aws/aws-sdk-go-v2/service/codecommit"
20
21
"github.com/aws/aws-sdk-go-v2/service/codecommit/types"
21
- "github.com/aws/aws-sdk-go/aws"
22
22
)
23
23
24
24
var (
@@ -94,7 +94,7 @@ func (c *CodeCommitDownloader) SetContext(ctx context.Context) {
94
94
// GetRepoInfo returns a repository information
95
95
func (c * CodeCommitDownloader ) GetRepoInfo () (* base.Repository , error ) {
96
96
output , err := c .codeCommitClient .GetRepository (c .ctx , & codecommit.GetRepositoryInput {
97
- RepositoryName : aws . String (c .repoName ),
97
+ RepositoryName : util . StringPointer (c .repoName ),
98
98
})
99
99
if err != nil {
100
100
return nil , err
@@ -126,7 +126,7 @@ func (c *CodeCommitDownloader) GetComments(commentable base.Commentable) ([]*bas
126
126
for {
127
127
resp , err := c .codeCommitClient .GetCommentsForPullRequest (c .ctx , & codecommit.GetCommentsForPullRequestInput {
128
128
NextToken : nextToken ,
129
- PullRequestId : aws . String (strconv .FormatInt (commentable .GetForeignIndex (), 10 )),
129
+ PullRequestId : util . StringPointer (strconv .FormatInt (commentable .GetForeignIndex (), 10 )),
130
130
})
131
131
if err != nil {
132
132
return nil , false , err
@@ -171,7 +171,7 @@ func (c *CodeCommitDownloader) GetPullRequests(page, perPage int) ([]*base.PullR
171
171
prs := make ([]* base.PullRequest , 0 , len (batch ))
172
172
for _ , id := range batch {
173
173
output , err := c .codeCommitClient .GetPullRequest (c .ctx , & codecommit.GetPullRequestInput {
174
- PullRequestId : aws . String (id ),
174
+ PullRequestId : util . StringPointer (id ),
175
175
})
176
176
if err != nil {
177
177
return nil , false , err
@@ -243,7 +243,7 @@ func (c *CodeCommitDownloader) getAllPullRequestIDs() ([]string, error) {
243
243
244
244
for {
245
245
output , err := c .codeCommitClient .ListPullRequests (c .ctx , & codecommit.ListPullRequestsInput {
246
- RepositoryName : aws . String (c .repoName ),
246
+ RepositoryName : util . StringPointer (c .repoName ),
247
247
NextToken : nextToken ,
248
248
})
249
249
if err != nil {
0 commit comments