Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Add flag for SilenceVCSStatusNoProjects #4179

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions cmd/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions cmd/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ var testFlags = map[string]interface{}{
RepoConfigFlag: "",
RepoConfigJSONFlag: "",
SilenceNoProjectsFlag: false,
SilenceVCSStatusNoProjectsFlag: false,
SilenceForkPRErrorsFlag: true,
SilenceAllowlistErrorsFlag: true,
SilenceVCSStatusNoPlans: true,
Expand Down
10 changes: 9 additions & 1 deletion runatlantis.io/docs/server-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading