diff options
author | Christian Muehlhaeuser <muesli@gmail.com> | 2021-09-02 15:15:13 +0200 |
---|---|---|
committer | Christian Muehlhaeuser <muesli@gmail.com> | 2021-09-02 15:15:13 +0200 |
commit | 810948f766349dbd9d5a54fa15ff562603a6fe7c (patch) | |
tree | 97d8b98d6db826cfbbc275d5ebae22fab77cd975 | |
parent | cc606a7e53199490172903e3a1cc879e4952f974 (diff) |
Support issue/pr identifier as the only argumentv0.1.1
-rw-r--r-- | main.go | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -36,6 +36,15 @@ func parseRepository() { if len(args) > 0 { arg = args[0] args = args[1:] + + if len(args) == 0 { + // only one arg provided. Is it an issue/pr number? + var err error + num, err = strconv.Atoi(arg) + if err == nil { + arg = "." + } + } } if len(args) > 0 { var err error |