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

Commit 4891c46

Browse files
check if there is issues to process before start processing (#77)
Signed-off-by: Ayman <[email protected]> Co-authored-by: Ayman <[email protected]>
1 parent 704b426 commit 4891c46

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

cmd/github/github.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3139,6 +3139,15 @@ func (j *DSGitHub) FetchItemsIssue(ctx *shared.Ctx) (err error) {
31393139
if err != nil {
31403140
Pages = 100
31413141
}
3142+
// check if there is issues to process
3143+
issuesCount, _, err := j.getItemsCount()
3144+
if err != nil {
3145+
return
3146+
}
3147+
if issuesCount == 0 {
3148+
return
3149+
}
3150+
31423151
for {
31433152
issues, er := j.githubIssues(ctx, j.Org, j.Repo, dateFrom, ctx.DateTo)
31443153
if er != nil {

0 commit comments

Comments
 (0)