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

fix: Change message for when request is not approved to be more accurate #3744

Merged
merged 4 commits into from
Sep 6, 2023

Conversation

lukemassa
Copy link
Contributor

@lukemassa lukemassa commented Sep 6, 2023

what

Changed verbiage on comment that is posted on a PR when the approval is required and not given.

why

The comment currently says "Pull request must be approved by at least one person other than the author before running apply". However that's not always true. What the code is actually looking for is for whether the relevant VCS calls this request "approved". In my case of gitlab, but presumably in other VCSs as well, there are a lot of things that could go into determining whether an approval is "sufficient" or not, which may or may not include a person other than the other approving. This causes confusion for users who, understandably, think they need to find someone else to approve their MR, when they might not.

Additionally, I don't see any code in https://github.com/runatlantis/atlantis/tree/master/server/events/vcs that would indicate that atlantis has logic that expects an approval by "at least one person other than the author".

It would potentially be better (but a lot more work) to have the VCSs expose a description of what it meant for a specific PR to be approved, and relay that to the end user. That's a possible followup from this, but this change at least makes the statement more accurate.

tests

I ran unit tests, should be sufficient since it's just changing a string.

references

closes #2290 (which was already closed by virtue of being stale).

@lukemassa lukemassa requested a review from a team as a code owner September 6, 2023 17:08
@github-actions github-actions bot added the go Pull requests that update Go code label Sep 6, 2023
@lukemassa lukemassa changed the title Change message for when request is not approved fix: Change message for when request is not approved to be more accurate Sep 6, 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 @lukemassa for the contribution.
I agree the message at this time is deceiving since as you say there are my other ways to restrict approvals.

@jamengual jamengual merged commit 6142b46 into runatlantis:main Sep 6, 2023
ijames-gc pushed a commit to gocardless/atlantis that referenced this pull request Feb 13, 2024
…ate (runatlantis#3744)

* Change message for when request is not approved

* Updates

* Fix

* Fix tests
ijames-gc pushed a commit to gocardless/atlantis that referenced this pull request Feb 13, 2024
…ate (runatlantis#3744)

* Change message for when request is not approved

* Updates

* Fix

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

Successfully merging this pull request may close these issues.

Wording in comment on unapproved pull requests is not accurate
2 participants