44 "context"
55 "net/http"
66
7- "github.com/google/go-github/v32 /github"
7+ "github.com/google/go-github/v42 /github"
88 graphql "github.com/shurcooL/githubv4"
99
1010 "github.com/gitploy-io/gitploy/internal/interactor"
@@ -51,7 +51,7 @@ func (g *Github) CompareCommits(ctx context.Context, u *ent.User, r *ent.Repo, b
5151 // TODO: Support pagination.
5252 res , _ , err := g .Client (ctx , u .Token ).
5353 Repositories .
54- CompareCommits (ctx , r .Namespace , r .Name , base , head )
54+ CompareCommits (ctx , r .Namespace , r .Name , base , head , & github. ListOptions {} )
5555 if err != nil {
5656 return nil , nil , err
5757 }
@@ -72,7 +72,7 @@ func (g *Github) CompareCommits(ctx context.Context, u *ent.User, r *ent.Repo, b
7272func (g * Github ) GetCommit (ctx context.Context , u * ent.User , r * ent.Repo , sha string ) (* extent.Commit , error ) {
7373 cm , res , err := g .Client (ctx , u .Token ).
7474 Repositories .
75- GetCommit (ctx , r .Namespace , r .Name , sha )
75+ GetCommit (ctx , r .Namespace , r .Name , sha , & github. ListOptions {} )
7676 // Github returns Unprocessable entity if the commit is not found.
7777 if res .StatusCode == http .StatusNotFound || res .StatusCode == http .StatusUnprocessableEntity {
7878 return nil , e .NewErrorWithMessage (e .ErrorCodeEntityNotFound , "The commit is not found." , err )
@@ -147,7 +147,7 @@ func (g *Github) ListBranches(ctx context.Context, u *ent.User, r *ent.Repo, opt
147147func (g * Github ) GetBranch (ctx context.Context , u * ent.User , r * ent.Repo , branch string ) (* extent.Branch , error ) {
148148 b , res , err := g .Client (ctx , u .Token ).
149149 Repositories .
150- GetBranch (ctx , r .Namespace , r .Name , branch )
150+ GetBranch (ctx , r .Namespace , r .Name , branch , false )
151151 if res .StatusCode == http .StatusNotFound {
152152 return nil , e .NewErrorWithMessage (e .ErrorCodeEntityNotFound , "The branch is not found." , err )
153153 } else if err != nil {
0 commit comments