-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
feat: pending apply status #2188
feat: pending apply status #2188
Conversation
…heck if the PR is mergeable like the doc next to it says
@jamengual @msarvar @nishkrishnan @zxpower can you help review/test this PR? or maybe someone from #2138 |
I have a question about this. Will this method ensure all other merge requirements are considered? For example it's possible to require commits to be signed or for all conversations to be resolved before PRs can be merged in GitHub. Will those requirements be taken into account before |
yes, it will only ignore the pending |
Will this create a "chicken or the egg" problem when one of We previously had an issue when an iteration of this PR was merged (without config flag), I documented it in #2182: |
We will be releasing base with the revert #2173 soon, hopefully this week.
Please keep the feedback coming so we can find a middle ground that works
for most people.
Thanks. Regards
…On Thu, Apr 7, 2022 at 12:00 AM Ed Laur ***@***.***> wrote:
With these changes we can configure the git repository to only be
mergeable if: all status succeed, at least 1 approval from CODEOWNERS and
only allow merging after atlantis is finished
Will this create a "chicken or the egg" problem when one of
apply_requirements will be mergeable? Foe example you won't be able to
apply until PR is "mergeable" status (based on octokit/octokit.net#1763
<octokit/octokit.net#1763>) and it won't be
mergeable until atlantis/apply passes.
We previously had an issue when an iteration of this PR was merged
(without config flag), I documented it in #2182
<#2182>: mergeable (in our
case approved by CODEOWNER) apply requirement was not honoured. It worked
fine after revert #2173
<#2173>.
—
Reply to this email directly, view it on GitHub
<#2188 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQ3ERBHUF5DNAGJTOUJXPTVD2BYDANCNFSM5SWS5XSA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I checked code and I think this change may not work as expected. Please double check my findings as I only have limited golang experience. The It is my understanding that even if we ignore the |
Checking octokit source the
Agreed, AFAIK it will look for the commit status, lets use this PR as an example:
GitHub considers it mergeable even without an approval from CODEOWNERS
Other approved PR:
|
I'm testing GitHub first because that's what I use but I will validate all this in GitLab after everything is working |
After further testing I'm not sure there is a way to do this in GitHub
I think it might be possible to workaround this in Atlantis but would need to change a lot of the logic (e.g. |
@AndreZiviani even though |
@edbighead yes you are right, I think its not set on this (atlantis) repo, but I tested it on my private repo and it returns |
@AndreZiviani - will we be able to remove the |
@snorlaX-sleeps yes, now there is an option to enable/disable this behavior (if this PR gets merged eventually) |
closing this as I could not find a reliable way to check what is blocking a PR in GitHub (status check or approval or ...) |
@AndreZiviani - I am guessing that flag will not be getting merged? (remove pending apply behaviour) |
@snorlaX-sleeps the pending apply behavior was already removed (#2173), this PR was an attempt to fix the bug that it introduced and add a flag to enable/disable this behavior |
This PR adds the following improvements:
plan
command is issued (including autoplan), this allows to configure the repository to only be mergeable if atlantis applied all changesatlantis/apply
status is pending/failing consider the PR mergeableWith these changes we can configure the git repository to only be mergeable if: all status succeed, at least 1 approval from CODEOWNERS and only allow merging after atlantis is finished
I have tried to implement it before on #2053 but ended up breaking some use-cases (#2176), this adds an option to enable/disable the behavior