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: Remove settings for require approval, mergeable, undiverged #4047

Merged
merged 2 commits into from
Dec 27, 2023

Conversation

lukemassa
Copy link
Contributor

@lukemassa lukemassa commented Dec 13, 2023

what

Require settings in user_config.go for RequireApproval, RequireMergeable, and RequireUndiverged, and remove the flags RequireApproval and RequireMergeable.

why

Requested by #2992, the options were deprecated by d78b106.

The vast majority of the use cases of these flags were by setting them to false in tests which called NewGlobalCfgFromArgs. Indeed, the only time they were explicitly set to true was in TestNewGlobalCfgFromArgs itself.

RequireUndiverged was actually not set as an actual flag, despite being set in server/user_config.go, so no flag configuration to be removed then.

This change left deprecationWarnings() a functional no-op. We switched from cobra's "deprecated" to "hidden" in b12d487cb with the creation of this function. Maybe in the future if we want to deprecate a field we can go back to using cobra's "MarkDeprecated()", or we can continue to use this dedicated function? That's probably a question best answered at the time.

tests

atlantis % go run main.go server --require-approval 
Error: unknown flag: --require-approval
atlantis % go run main.go server --require-mergeable
Error: unknown flag: --require-mergeable

There should be no functional changes, since both of these flags were hidden and defaulted to false.

references

@lukemassa lukemassa changed the title Remove settings for require approval, mergeable, undiverged feat: Remove settings for require approval, mergeable, undiverged Dec 13, 2023
@lukemassa lukemassa marked this pull request as ready for review December 13, 2023 04:44
@lukemassa lukemassa requested a review from a team as a code owner December 13, 2023 04:44
@github-actions github-actions bot added docs Documentation go Pull requests that update Go code labels Dec 13, 2023
jamengual
jamengual previously approved these changes Dec 13, 2023
Copy link
Contributor

@jamengual jamengual left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much @lukemassa

@jamengual
Copy link
Contributor

/cherry-pick release-0.27

@lukemassa lukemassa changed the title feat: Remove settings for require approval, mergeable, undiverged chore: Remove settings for require approval, mergeable, undiverged Dec 27, 2023
@lukemassa lukemassa enabled auto-merge (squash) December 27, 2023 15:47
@lukemassa lukemassa merged commit 6cad7e6 into runatlantis:main Dec 27, 2023
24 checks passed
@GenPage
Copy link
Member

GenPage commented Jan 21, 2024

/cherry-pick release-0.27

Copy link

Cherry-pick failed with Merge error 6cad7e6482d1e10410662d86c5c9f339fc094371 into temp-cherry-pick-89bc47-release-0.27

ijames-gc pushed a commit to gocardless/atlantis that referenced this pull request Feb 13, 2024
…unatlantis#4047)

* Remove settings for require approval, mergeable, undiverged

* Fix
ijames-gc pushed a commit to gocardless/atlantis that referenced this pull request Feb 13, 2024
…unatlantis#4047)

* Remove settings for require approval, mergeable, undiverged

* Fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecate old flags
4 participants