-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from suba327777/feat/github-api-commit-count
add GitHub api commit count
- Loading branch information
Showing
6 changed files
with
51 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,20 @@ | ||
package api | ||
|
||
func commitCountDailySince1Month(DailyCommitsSince1Month map[string]int) int { | ||
func dailyCommitsPeriodCount(dailyCommitsPeriodCount map[string]int) int { | ||
count := 0 | ||
for _, commits := range DailyCommitsSince1Month { | ||
for _, commits := range dailyCommitsPeriodCount { | ||
if commits >= 1 { | ||
count++ | ||
} | ||
} | ||
return count | ||
} | ||
|
||
func commitsPeriodCount(commitsPerodCount map[string]int) int { | ||
count := 0 | ||
for _, commits := range commitsPerodCount { | ||
count += commits | ||
} | ||
|
||
return count | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
package object | ||
|
||
type UserData struct { | ||
DailyCommitsSince1Month map[string]int | ||
DailyCommitsPeriod map[string]int | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters