Skip to content

Commit

Permalink
fix: replace min to max
Browse files Browse the repository at this point in the history
  • Loading branch information
maolonglong committed Nov 17, 2021
1 parent 97cb7a7 commit de0ebd5
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,6 @@ func getRepo() (string, string) {
return a[0], a[1]
}

func min(a, b int) int {
if a < b {
return a
}
return b
}

func abs(a int) int {
if a < 0 {
return -a
Expand Down Expand Up @@ -62,7 +55,9 @@ func main() {
}

starsChange := cast.ToInt(githubactions.GetInput("stars_change"))
starsChange = min(1, starsChange)
if starsChange < 1 {
starsChange = 1
}

targetOwner, targetName := owner, name
repo := githubactions.GetInput("repo")
Expand Down

0 comments on commit de0ebd5

Please sign in to comment.