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

Allow writing policies which mention repo 'admins' or 'collaborators' #15

Closed
jmcampanini opened this issue Oct 12, 2018 · 0 comments
Closed
Labels
enhancement New feature or request

Comments

@jmcampanini
Copy link
Member

I want to make sure certain excavator changes can merge without human intervention in every single repo in foundry. The problem is that I need to generate a policy.yml that is appropriate for each repo, taking into account all their different collaborators and admins.

Proposal

Allow the values 'admins' and 'collaborators' in policy.yml files, e.g.:

policy:
  approval:
    - or:
      - maintainer approval
      - excavator only touched gradle files

approval_rules:

  - name: maintainer approval
    requires:
      count: 1
      github:
        - admins # <--- policy-bot would expand this to all users & teams with admin access
        - collaborators

  - name: excavator only touched gradle files
    requires:
      count: 0
    if:
      has_author_in:
        users: [ "svc-excavator" ]
      only_changed_files:
        paths:
          - "^.*gradle$"

This ensures there's one source of truth for who is in control of a repository and for the moment it's the github settings tab.

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

No branches or pull requests

2 participants