Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Commit

Permalink
check if there is issues to process before start processing (#77)
Browse files Browse the repository at this point in the history
Signed-off-by: Ayman <[email protected]>
Co-authored-by: Ayman <[email protected]>
  • Loading branch information
khalifapro and enkhalifapro authored Feb 28, 2023
1 parent 704b426 commit 4891c46
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cmd/github/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -3139,6 +3139,15 @@ func (j *DSGitHub) FetchItemsIssue(ctx *shared.Ctx) (err error) {
if err != nil {
Pages = 100
}
// check if there is issues to process
issuesCount, _, err := j.getItemsCount()
if err != nil {
return
}
if issuesCount == 0 {
return
}

for {
issues, er := j.githubIssues(ctx, j.Org, j.Repo, dateFrom, ctx.DateTo)
if er != nil {
Expand Down

0 comments on commit 4891c46

Please sign in to comment.