Skip to content
This repository was archived by the owner on Oct 12, 2020. It is now read-only.

Commit

Permalink
Fix progress bar bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Ullaakut committed Aug 5, 2019
1 parent d528619 commit 72d5887
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/gql/fetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ func FetchContributions(ctx *context.Context, cursors []string, untilYear int) (
requestBody := buildRequestBody(ctx, fetchContributionsRequest, contribPagination)
client := &http.Client{}

progress, bar := setupProgressBar(len(cursors) + 2)
progress, bar := setupProgressBar(len(cursors) + 1)
defer progress.Wait()

// If we are scanning only a portion of stargazers, the
Expand Down Expand Up @@ -226,7 +226,6 @@ func FetchContributions(ctx *context.Context, cursors []string, untilYear int) (
// Get all user contributions for each year.
currentYear := time.Now().Year()
for i := 0; currentYear-i > untilYear-1; i++ {

// Inject the dates corresponding to the year we're scanning, into the request body.
from := time.Date(currentYear-i, time.January, 1, 0, 0, 0, 0, time.UTC)
to := from.Add(year - 1*time.Second)
Expand Down

0 comments on commit 72d5887

Please sign in to comment.