Skip to content

Add condition checks to be able to check if pr author is member of an org in any way or not. #2469

Open
@AraHaan

Description

@AraHaan

Expected Behavior

I would like the following to be possible some point in the future for rule conditions to check the author of a pr if (assuming the repository is in an open source only org):

  • the user is an outside contributor to the org (is a contributor added directly to the repository itself that the pr is in) and has write access
  • is a member of the org but not part of a team inside it but has write access
  • is a member and part of a team and has write access.

Actual Behavior

No such information is exposed that checks those 3 cases and if any true, returns true.

Steps to Reproduce the Problem

  1. Adding labels as part of a rule.
  2. At the end of the CI build workflow, have Mergify run the other rule which then adds the automerge label.
  3. Have the automerge label, and required status checks from branch protections manually defined in the rules to approve, comment, and then right after merge the PR.

Workarounds

Currently the only workaround is to manually duplicate the rule x # of times and then hard code specific user names into the rule conditions for each person to check for. This is not robust as any members could be added / removed at any time breaking the intended rules and poses an issue. What is really wanted is for the bot to check without hard coding them in the rules to do the same thing with a much smaller and simpler config since people can join / leave at any moment in time.

Specifications

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions