Accept a bare integer as seconds for watchpr --interval
- add agent.ParseDurationFlag: bare integer means seconds, duration strings still parse - take --interval as a string and parse it in the command - reject unparseable and non-positive values with an error naming the flag
This commit is contained in:
@@ -70,6 +70,9 @@ watchpr unkin/argocd-apps#42
|
||||
# Multiple PRs, custom interval; refs accept #N or :N
|
||||
watchpr --interval 30s unkin/argocd-apps#42 unkin/terraform-vault:98
|
||||
|
||||
# --interval takes a duration (30s, 2m, 1h30m) or a bare number of seconds
|
||||
watchpr --interval 30 unkin/argocd-apps#42
|
||||
|
||||
# One-shot: print current state and exit 0 (great for scripts)
|
||||
watchpr --once unkin/argocd-apps#42
|
||||
watchpr --once --json unkin/argocd-apps#42
|
||||
|
||||
Reference in New Issue
Block a user