A web service that suggests approvers for a GitHub pull request based on OWNERS files and enforces reviews by OWNERS as a GitHub status check.
-
Clone the github-owners-bot repository.
git clone git@github.com:google/github-owners-bot.git ${directory}
-
Clone the target repository to be evaluated. The github-owners-bot app requires a local copy of the target repository that we evaluate. You will need to set the
GITHUB_REPO_DIR
environment variable to the path of that target repository. ex.git clone git@github.com:ampproject/amphtml.git ${target_directory}
-
Set the
REPO_DIR
environment variable to thetarget_repository
path that was used in the step above. -
Set the
APP_ID
environment variable to your GitHub probot application. -
Set the
NODE_ENV
environment variable to "development". -
Set the
WEBHOOK_SECRET
environment variable to match what you set up on your GitHub Webhook pages. -
Install the
amp-owners-bot
GitHub on the remote target repository (This should be the same repository that you had closed for the local target repository) -
Go back into the
github-owners-bot
directory and runyarn
. -
Run
npm run dev
to start the local server. You can also runLOG_LEVEL=trace npm run dev
for maximum logging while developing the application.