chore: Add flag for SilenceVCSStatusNoProjects (#4179)

* chore: Add flag for SilenceVCSStatusNoProjects

* Add docs

* Fix desc
This commit is contained in:
Luke Massa
2024-01-28 12:08:23 -05:00
committed by GitHub
parent a0fc4c3e5a
commit 25d800e740
3 changed files with 15 additions and 1 deletions

View File

@@ -120,6 +120,7 @@ const (
SilenceNoProjectsFlag = "silence-no-projects"
SilenceForkPRErrorsFlag = "silence-fork-pr-errors"
SilenceVCSStatusNoPlans = "silence-vcs-status-no-plans"
SilenceVCSStatusNoProjectsFlag = "silence-vcs-status-no-projects"
SilenceAllowlistErrorsFlag = "silence-allowlist-errors"
SkipCloneNoChanges = "skip-clone-no-changes"
SlackTokenFlag = "slack-token"
@@ -510,6 +511,10 @@ var boolFlags = map[string]boolFlag{
description: "Silences VCS commit status when autoplan finds no projects to plan.",
defaultValue: false,
},
SilenceVCSStatusNoProjectsFlag: {
description: "Silences VCS commit status when for all commands when a project is not defined.",
defaultValue: false,
},
SilenceAllowlistErrorsFlag: {
description: "Silences the posting of allowlist error comments.",
defaultValue: false,

View File

@@ -119,6 +119,7 @@ var testFlags = map[string]interface{}{
RepoConfigFlag: "",
RepoConfigJSONFlag: "",
SilenceNoProjectsFlag: false,
SilenceVCSStatusNoProjectsFlag: false,
SilenceForkPRErrorsFlag: true,
SilenceAllowlistErrorsFlag: true,
SilenceVCSStatusNoPlans: true,

View File

@@ -931,7 +931,15 @@ This is useful when you have many projects and want to keep the pull request cle
# or
ATLANTIS_SILENCE_VCS_STATUS_NO_PLANS=true
```
`--silence-vcs-status-no-plans` will tell Atlantis to ignore setting VCS status if none of the modified files are part of a project defined in the `atlantis.yaml` file.
`--silence-vcs-status-no-plans` will tell Atlantis to ignore setting VCS status on plans if none of the modified files are part of a project defined in the `atlantis.yaml` file.
### `--silence-vcs-status-no-projects`
```bash
atlantis server --silence-vcs-status-no-projects
# or
ATLANTIS_SILENCE_VCS_STATUS_NO_PROJECTS=true
```
`--silence-vcs-status-no-projects` will tell Atlantis to ignore setting VCS status on any command if none of the modified files are part of a project defined in the `atlantis.yaml` file.
### `--skip-clone-no-changes`
```bash