You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rootCmd.Flags().String("repo", "", "Git repository. Format: OWNER/REPO. Mutually exclusive with --repo-regex")
308
+
rootCmd.Flags().String("repo-regex", "", "Regex matched against normalized Argo CD repoURL values for templated repository URLs. Mutually exclusive with --repo")
306
309
307
310
// Folders
308
311
rootCmd.Flags().StringP("output-folder", "o", DefaultOutputFolder, "Output folder where the diff will be saved")
@@ -327,7 +330,7 @@ func Parse() *Config {
327
330
rootCmd.Flags().Bool("auto-detect-files-changed", DefaultAutoDetectFilesChanged, "Auto detect files changed between branches")
328
331
rootCmd.Flags().Bool("ignore-invalid-watch-pattern", DefaultIgnoreInvalidWatchPattern, "Ignore invalid watch pattern Regex on Applications")
329
332
rootCmd.Flags().Bool("watch-if-no-watch-pattern-found", DefaultWatchIfNoWatchPatternFound, "Render applications without watch pattern")
330
-
rootCmd.Flags().String("redirect-target-revisions", "", "List of target revisions to redirect")
333
+
rootCmd.Flags().String("redirect-target-revisions", "", "Comma-separated source targetRevision values to redirect to the target branch. Example: main,HEAD. By default, every targetRevision in matching repositories is redirected")
331
334
rootCmd.Flags().String("title", DefaultTitle, "Custom title for the markdown output")
332
335
rootCmd.Flags().Bool("hide-deleted-app-diff", DefaultHideDeletedAppDiff, "Hide diff content for fully deleted applications (only show deletion header)")
333
336
rootCmd.Flags().String("argocd-ui-url", DefaultArgocdUIURL, "Argo CD URL to generate application links in diff output (e.g., https://argocd.example.com)")
@@ -373,8 +376,11 @@ func (o *RawOptions) checkRequired() []string {
373
376
ifo.TargetBranch=="" {
374
377
errors=append(errors, "target-branch")
375
378
}
376
-
ifo.Repo=="" {
377
-
errors=append(errors, "repo")
379
+
ifo.Repo==""&&o.RepoRegex=="" {
380
+
errors=append(errors, "repo or repo-regex")
381
+
}
382
+
ifo.Repo!=""&&o.RepoRegex!="" {
383
+
errors=append(errors, "repo and repo-regex are mutually exclusive")
|`--repo <repo>`|`REPO`| Git Repository in format `OWNER/REPO` (e.g., `dag-andersen/argocd-diff-preview`)|
15
+
|`--repo <repo>`or `--repo-regex <regex>`|`REPO`or `REPO_REGEX`| Git repository in format `OWNER/REPO`, or a regex for templated Argo CD repoURL values. These options are mutually exclusive|
16
16
|`--target-branch <target-branch>`, `-t`|`TARGET_BRANCH`| Target branch name (the branch you want to compare with the base branch) |
|`--max-diff-length <length>`|`MAX_DIFF_LENGTH`|`65536`| Max diff message character count (only limits the generated Markdown file) |
65
65
|`--output-folder <folder>`, `-o`|`OUTPUT_FOLDER`|`./output`| Output folder where the diff will be saved |
66
-
|`--redirect-target-revisions <revs>`|`REDIRECT_TARGET_REVISIONS`| - |List of target revisions to redirect |
66
+
|`--redirect-target-revisions <revs>`|`REDIRECT_TARGET_REVISIONS`| - |Comma-separated source targetRevision values to redirect to the target branch. Example: main,HEAD. By default, every targetRevision in matching repositories is redirected|
0 commit comments