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

How we can exclude bot from approval #847

Open
rajesh-dhakad opened this issue Sep 20, 2024 · 1 comment
Open

How we can exclude bot from approval #847

rajesh-dhakad opened this issue Sep 20, 2024 · 1 comment

Comments

@rajesh-dhakad
Copy link

We have a usecase where the gh-auto-approve bot approves the PR - how can I exclude gh-auto-approve from approval_rules?

Note: gh-auto-approve is part of our org/eng team which we want to keep as it is.

policy:
  approval:
        - the eng team approval

approval_rules:
  - name: the eng team approval
    requires:
      count: 1
      teams:
        - "org/eng"
@bluekeyes
Copy link
Member

There's currently no support for ignoring approvals from specific users who otherwise meet the conditions specified in the rule. I think your best option will be to create a new team, maybe org/eng-approvers, as a nested team of the org/eng team and then move all of the users except for gh-auto-approve to the child team. Finally, update your policy to use the org/eng-approvers in the approval rule. Using a nested team should mean that you don't have to change anything else that uses the org/eng team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants