Giter Site home page Giter Site logo

rbacbot's Introduction

RBACBot -- Role Based Access Control BOT

For monorepo users/lovers, this helps you manage write access (through Pull Request) per file/directory basis.

Usage

RBACBOT_WEBHOOK_SECRET=*** RBACBOT_ACCESS_TOKEN=*** rbacbot github

Once PRs are open, this will check the config and diff patch and find whom are in charge of these changes (configured via .rbacbot.yaml below).

For each diff, only those who met all access rules of all changed files can trigger a Review Aceept check, once numAcceptRequired is met, the PR is automatically merged.

Notice

Please make sure the webhook can receive Pull requests and Pull request reviews events and repo scopes for token.

Environment Variables

Name Default Usage
RBACBOT_CONFIG_NAME .rbacbot.yaml config file name in repo
RBACBOT_ADDR :4567 on which address webhook listens on
RBACBOT_TTL 1h config/diff patches in memory cache period
RBACBOT_WEBHOOK_SECRET web hook secret
RBACBOT_ACCESS_TOKEN oauth/personal access token for github api

.rbacbot.yaml

settings:
 numAcceptRequired: 2
 mergeMethod: squash # merge, rebase
roles:
 supremeleader:   # role name
   - user: joesonw  # user name
access:
 '*':  # file glob
   - supremeleader  # role name

rbacbot's People

Contributors

joesonw avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.