@@ -14,11 +14,11 @@ import (
1414 "code.gitea.io/gitea/modules/log"
1515 base "code.gitea.io/gitea/modules/migration"
1616 "code.gitea.io/gitea/modules/structs"
17+ "code.gitea.io/gitea/modules/util"
1718
1819 "github.com/aws/aws-sdk-go-v2/credentials"
1920 "github.com/aws/aws-sdk-go-v2/service/codecommit"
2021 "github.com/aws/aws-sdk-go-v2/service/codecommit/types"
21- "github.com/aws/aws-sdk-go/aws"
2222)
2323
2424var (
@@ -94,7 +94,7 @@ func (c *CodeCommitDownloader) SetContext(ctx context.Context) {
9494// GetRepoInfo returns a repository information
9595func (c * CodeCommitDownloader ) GetRepoInfo () (* base.Repository , error ) {
9696 output , err := c .codeCommitClient .GetRepository (c .ctx , & codecommit.GetRepositoryInput {
97- RepositoryName : aws . String (c .repoName ),
97+ RepositoryName : util . StringPointer (c .repoName ),
9898 })
9999 if err != nil {
100100 return nil , err
@@ -126,7 +126,7 @@ func (c *CodeCommitDownloader) GetComments(commentable base.Commentable) ([]*bas
126126 for {
127127 resp , err := c .codeCommitClient .GetCommentsForPullRequest (c .ctx , & codecommit.GetCommentsForPullRequestInput {
128128 NextToken : nextToken ,
129- PullRequestId : aws . String (strconv .FormatInt (commentable .GetForeignIndex (), 10 )),
129+ PullRequestId : util . StringPointer (strconv .FormatInt (commentable .GetForeignIndex (), 10 )),
130130 })
131131 if err != nil {
132132 return nil , false , err
@@ -171,7 +171,7 @@ func (c *CodeCommitDownloader) GetPullRequests(page, perPage int) ([]*base.PullR
171171 prs := make ([]* base.PullRequest , 0 , len (batch ))
172172 for _ , id := range batch {
173173 output , err := c .codeCommitClient .GetPullRequest (c .ctx , & codecommit.GetPullRequestInput {
174- PullRequestId : aws . String (id ),
174+ PullRequestId : util . StringPointer (id ),
175175 })
176176 if err != nil {
177177 return nil , false , err
@@ -243,7 +243,7 @@ func (c *CodeCommitDownloader) getAllPullRequestIDs() ([]string, error) {
243243
244244 for {
245245 output , err := c .codeCommitClient .ListPullRequests (c .ctx , & codecommit.ListPullRequestsInput {
246- RepositoryName : aws . String (c .repoName ),
246+ RepositoryName : util . StringPointer (c .repoName ),
247247 NextToken : nextToken ,
248248 })
249249 if err != nil {
0 commit comments