-
Notifications
You must be signed in to change notification settings - Fork 110
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
has_status bug - PR merged without approval #903
Comments
Hey @rajesh-dhakad, sorry you ran in to this issue. Can you please share your full YAML policy definition, redacting any sensitive team names or other information? Note that when you view the details page for a pul request, Policy Bot re-evaluates the status using the current policy and commit state, which may be different from the state when the pull request merged. My guess here is that there is some combination of rules in your policy that can allow unintentional approval, but it's hard to confirm that without seeing the full definition. |
Hey @bluekeyes - Please see below policy details:
|
After reviewing your policy, this is expected behavior and is a consequence of your policy and how predicates (the A rule's predicate controls whether or not the rule applies. If the predicate is not currently met, then the rule has the
Since you are now viewing the policy after the status was posted, the rule is enabled again and it looks like the overall state is pending. Here are two possible fixes:
|
Thank you @bluekeyes - Let me test this suggestion. |
Hi Team - We encountered a situation where PR merged without meeting the policy bot's criteria.
The policy bot's current status is still
Pending
but PR has been merged into the master.Eng has enabled auto merge and rebased the feature branch with master ( merging master into his feature branch ) and the policy bot status changed to
Approved
and PR got merged - without meeting the criteria of policy bot, you can see in above screenshot - which shows current status of the policy bot.The text was updated successfully, but these errors were encountered: