This repo contains a Probot application. The application contains the plugins listed below and is deployed using the probot/serverless-lambda package via the Serverless framework.
The plugins are listed in the src/plugins folder.
- Label Checker - Sets a status on PRs that passes if one (and only one) of the following labels from each list have been applied:
bug
,doc
,feature request
, orimprovement
breaking
ornon-breaking
- Release Drafter - Opens up a draft release on GitHub anytime a PR is merged to a versioned branch (i.e.
branch-0.17
,branch-0.18
, etc.). The draft body includes a categorized changelog consisting of the PRs that have been merged on that branch. - Auto Merger - Automatically merges PRs that include the
/merge
comment and meet the merge criteria outlined in https://docs.rapids.ai/resources/auto-merger/. - Branch Checker - Set a status on PRs that checks whether they are targeting either the repo's default branch or default branch + 1
- Recently Updated - Sets a status on PRs based on whether a PR is
X
commits out-of-date compared to the based branch.X
defaults to5
, but is configurable via therecently_updated_threshold
option in the.github/ops-bot.yaml
configuration file.
The project's infrastructure is managed using Terraform. Key components include:
- AWS Lambda functions for the Probot handler and authorizer
- API Gateway with custom authorizer
- IAM roles and policies
- CloudWatch log groups
- S3 bucket for deployment artifacts
- Terraform v1.9.2 or later
- AWS CLI configured with appropriate credentials
- Node.js 18.x
The deployment is automated via GitHub Actions. For manual deployment:
- Build the application:
npm install
npm run build
- Package Lambda functions:
zip -r probot-{version}.zip dist
zip -r authorizer-{version}.zip dist/authorizer.js
- Upload to S3:
aws s3 cp probot-{version}.zip s3://rapidsai-serverless-deployments/serverless/ops-bot/prod/
aws s3 cp authorizer-{version}.zip s3://rapidsai-serverless-deployments/serverless/ops-bot/prod/
- Deploy infrastructure:
cd terraform
terraform init
terraform plan
terraform apply
APP_ID
: GitHub App IDWEBHOOK_SECRET
: GitHub Webhook SecretPRIVATE_KEY
: GitHub App Private KeyGPUTESTER_PAT
: GPU Tester Personal Access Token
# Build
npm run build
# Test
npm run test
# Deploy
npm run deploy