diff --git a/cmd/generate.go b/cmd/generate.go index a2c12cd..252f9c5 100644 --- a/cmd/generate.go +++ b/cmd/generate.go @@ -26,7 +26,6 @@ var ( ) func runGenerate(cmd *cli.Context) error { - if ConfigPathFlag == "" { ConfigPathFlag = getDefaultConfigFile() } diff --git a/config/config.go b/config/config.go index fcd9b90..cf040ed 100644 --- a/config/config.go +++ b/config/config.go @@ -30,7 +30,7 @@ type Config struct { SkipRegex *regexp.Regexp `yaml:"-"` } -// Load a config from a path, defaulting to changelog.example.yml +// New Load a config from a path, defaulting to changelog.example.yml func New(configPath string) (*Config, error) { var err error var configContent []byte diff --git a/go.mod b/go.mod index 9467e01..0d9f714 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module code.gitea.io/changelog go 1.13 require ( - code.gitea.io/sdk/gitea v0.0.0-20200131051706-c1cfc890f875 + code.gitea.io/sdk/gitea v0.11.1-0.20200209183134-ba7916819f3f github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect github.com/google/go-github v17.0.0+incompatible github.com/google/go-querystring v1.0.0 // indirect diff --git a/go.sum b/go.sum index 2d4f897..3acd09d 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -code.gitea.io/sdk/gitea v0.0.0-20200131051706-c1cfc890f875 h1:Rw4BbCwc0L4JwJko1b/k9fBuVG0NQEnGupuDZx4n+WE= -code.gitea.io/sdk/gitea v0.0.0-20200131051706-c1cfc890f875/go.mod h1:z3uwDV/b9Ls47NGukYM9XhnHtqPh/J+t40lsUrR6JDY= +code.gitea.io/sdk/gitea v0.11.1-0.20200209183134-ba7916819f3f h1:Ezc1cu8bksy+eqCA0fuvkPdppqCzfJIbNQ/8ipeBV3k= +code.gitea.io/sdk/gitea v0.11.1-0.20200209183134-ba7916819f3f/go.mod h1:z3uwDV/b9Ls47NGukYM9XhnHtqPh/J+t40lsUrR6JDY= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= diff --git a/service/gitea.go b/service/gitea.go index 23356b3..588871b 100644 --- a/service/gitea.go +++ b/service/gitea.go @@ -40,7 +40,10 @@ func (ge *Gitea) Generate() (string, []PullRequest, error) { perPage := 40 for { results, err := client.ListRepoPullRequests(ge.Owner, ge.Repo, gitea.ListPullRequestsOptions{ - Page: p, + ListOptions: gitea.ListOptions{ + Page: p, + PageSize: perPage, + }, State: "closed", Milestone: milestoneID, }) @@ -91,7 +94,10 @@ func (ge *Gitea) Contributors() (ContributorList, error) { perPage := 100 for { results, err := client.ListRepoPullRequests(ge.Owner, ge.Repo, gitea.ListPullRequestsOptions{ - Page: p, + ListOptions: gitea.ListOptions{ + Page: p, + PageSize: perPage, + }, State: "closed", Milestone: milestoneID, })