Skip to content

Commit

Permalink
Read the GitHub Action env var for subscriber threshold (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
unknwon committed May 17, 2022
1 parent cf059c5 commit 4bd0cba
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,16 @@ func githubActionOptions() (*options, error) {
return nil, fmt.Errorf("env var INPUT_FILENAME not set")
}

subscriberThreshold, _ := strconv.Atoi(os.Getenv("INPUT_SUBSCRIBER-THRESHOLD"))

o := &options{
cwd: cwd,
format: "markdown",
filename: filename,
baseRef: event.PullRequest.Base.Sha,
headRef: event.PullRequest.Head.Sha,
author: "@" + event.PullRequest.User.Login,
cwd: cwd,
format: "markdown",
filename: filename,
subscriberThreshold: subscriberThreshold,
baseRef: event.PullRequest.Base.Sha,
headRef: event.PullRequest.Head.Sha,
author: "@" + event.PullRequest.User.Login,
}
o.print = commentOnGitHubPullRequest(o, event.PullRequest.NodeID)
return o, nil
Expand Down

0 comments on commit 4bd0cba

Please sign in to comment.