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 [email protected]: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_DIRenvironment variable to the path of that target repository. ex.git clone [email protected]:ampproject/amphtml.git ${target_directory} -
Set the
REPO_DIRenvironment variable to thetarget_repositorypath that was used in the step above. -
Set the
APP_IDenvironment variable to your GitHub probot application. -
Set the
NODE_ENVenvironment variable to "development". -
Set the
WEBHOOK_SECRETenvironment variable to match what you set up on your GitHub Webhook pages. -
Install the
amp-owners-botGitHub 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-botdirectory and runyarn. -
Run
npm run devto start the local server. You can also runLOG_LEVEL=trace npm run devfor maximum logging while developing the application.