Skip to content

Commit

Permalink
Update module gitlab.com/ribtoks/tdg to v0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ribtoks committed Jan 9, 2023
1 parent eee0849 commit 2bdbb28
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 13 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ You can use this action together with [parent issue updater](https://github.com/
| `ADD_LIMIT` | Upper cap on the number of issues to create (defaults to `0` - unlimited) |
| `CLOSE_LIMIT` | Upper cap on the number of issues to close (defaults to `0` - unlimited) |
| `COMMENT_ON_ISSUES` | Leave a comment in which commit the issue was closed (defaults to `0` - do not comment) |
| `CONCURRENCY` | How many files to process in parallel (defaults to `128`) |

> **NOTE:** Keep in mind that you have to escape slashes in regex patterns when putting them to yaml

Expand Down
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ inputs:
ADD_LIMIT:
description: "Limit number of issues to create during workflow"
default: ""
CONCURRENCY:
description: "Amount of files to process in parallel"
default: "128"
CLOSE_LIMIT:
description: "Limit number of issues to close during workflow"
default: ""
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect
github.com/google/go-github/v49 v49.0.0
github.com/kr/pretty v0.1.0 // indirect
gitlab.com/ribtoks/tdg v0.0.0-20220811051936-9a3d5994ec91
gitlab.com/ribtoks/tdg v0.0.1
golang.org/x/oauth2 v0.4.0
google.golang.org/protobuf v1.28.1 // indirect
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
github.com/zieckey/goini v0.0.0-20180118150432-0da17d361d26 h1:E0lEWrifmR0ACbGf5PLji1XbW6rtIXLHCXO/YOqi0AE=
github.com/zieckey/goini v0.0.0-20180118150432-0da17d361d26/go.mod h1:TQpdgg7I9+PFIkatlx/dnZyZb4iZyCUx1HJj4rXi3+E=
gitlab.com/ribtoks/tdg v0.0.0-20220811051936-9a3d5994ec91 h1:ca0oTL07Xsb+bOhsOq23clWlwOFCDgz/KDs8EgBvrK0=
gitlab.com/ribtoks/tdg v0.0.0-20220811051936-9a3d5994ec91/go.mod h1:XDYfJNbUbnnCW6lGCC2TLumDieEI04L0VtjVbgDKz1w=
gitlab.com/ribtoks/tdg v0.0.1 h1:8Q6gOqsy3VHp+zYol9yDt2IAVibr7YSq3beYq20SP0Q=
gitlab.com/ribtoks/tdg v0.0.1/go.mod h1:XDYfJNbUbnnCW6lGCC2TLumDieEI04L0VtjVbgDKz1w=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg=
Expand Down
10 changes: 9 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const (
defaultAddLimit = 0
defaultCloseLimit = 0
defaultIssuesPerPage = 200
defaultConcurrency = 128
contextLinesUp = 3
contextLinesDown = 7
ghRoot = "/github/workspace"
Expand Down Expand Up @@ -56,6 +57,7 @@ type env struct {
minChars int
addLimit int
closeLimit int
concurrency int
closeOnSameBranch bool
extendedLabels bool
dryRun bool
Expand Down Expand Up @@ -120,6 +122,11 @@ func environment() *env {
e.closeLimit = defaultCloseLimit
}

e.concurrency, err = strconv.Atoi(os.Getenv("INPUT_CONCURRENCY"))
if err != nil {
e.concurrency = defaultConcurrency
}

e.projectColumnID, err = strconv.ParseInt(os.Getenv("INPUT_PROJECT_COLUMN_ID"), 10, 64)
if err != nil {
e.projectColumnID = -1
Expand Down Expand Up @@ -456,7 +463,8 @@ func main() {
includePatterns,
excludePatterns,
env.minWords,
env.minChars)
env.minChars,
env.concurrency)

comments, err := td.Generate()
if err != nil {
Expand Down
23 changes: 15 additions & 8 deletions vendor/gitlab.com/ribtoks/tdg/pkg/tdglib/todogenerator.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ github.com/google/go-querystring/query
## explicit
# github.com/zieckey/goini v0.0.0-20180118150432-0da17d361d26
github.com/zieckey/goini
# gitlab.com/ribtoks/tdg v0.0.0-20220811051936-9a3d5994ec91
# gitlab.com/ribtoks/tdg v0.0.1
## explicit
gitlab.com/ribtoks/tdg/pkg/tdglib
# golang.org/x/crypto v0.0.0-20210921155107-089bfa567519
Expand Down

0 comments on commit 2bdbb28

Please sign in to comment.