A Go-based tool to analyze merged pull requests and determine their presence across release branches. Available as both a CLI tool for individual use and a Slack bot server for team collaboration.
β¨ Ready to use out of the box - go install gives you a fully functional tool, just configure Google Sheets API access! The tool helps track the deployment status of changes across different release versions.
latest- Production branch (stable releases)master- Development branch (active development)
# Install latest release
go install github.com/openshift-assisted/pr-bot@latest
# Add Go bin to PATH (if needed)
export PATH=$PATH:~/go/bin
# Set up your API tokens
export PR_BOT_GITHUB_TOKEN="your_github_token_here"
export PR_BOT_GITLAB_TOKEN="your_gitlab_token_here"
export PR_BOT_JIRA_TOKEN="your_jira_token_here"
export PR_BOT_JIRA_EMAIL="your_email@redhat.com"
# Start analyzing PRs right away - no external files needed!
pr-bot -pr https://github.com/openshift/assisted-service/pull/7788
# Check version
pr-bot -version# Set up all required tokens in .env file
cat > .env << EOF
# Required tokens for all functionality
PR_BOT_GITHUB_TOKEN=your_github_token_here
PR_BOT_GITLAB_TOKEN=your_gitlab_token_here
PR_BOT_JIRA_TOKEN=your_jira_api_token_here
PR_BOT_JIRA_EMAIL=your_email@redhat.com
# Required for Slack bot server mode (OAuth bot token)
PR_BOT_SLACK_BOT_TOKEN=xoxb-your-bot-token-here
# Required: Google Sheets for GA data (service account for private sheets)
PR_BOT_GOOGLE_SERVICE_ACCOUNT_JSON='{"type": "service_account", "project_id": "your-project", "private_key_id": "...", "private_key": "-----BEGIN PRIVATE KEY-----\\n...\\n-----END PRIVATE KEY-----\\n", "client_email": "your-service-account@project-id.iam.gserviceaccount.com", "client_id": "...", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://oauth2.googleapis.com/token"}'
PR_BOT_GOOGLE_SHEET_ID=your_private_google_sheet_id_here
EOF
# Start server
pr-bot -server
# Use in Slack (multiple ways)
/pr https://github.com/openshift/assisted-service/pull/7788
@pr-bot pr https://github.com/openshift/assisted-service/pull/7788
# Or send direct message: pr https://github.com/openshift/assisted-service/pull/7788- CLI Tool: Perfect for individual developers and CI/CD pipelines
- Slack Bot Server: Team-friendly slash commands for collaborative analysis
- PR Analysis: Get detailed information about merged pull requests including commit hash and merge date
- Release Branch Tracking: Automatically discover and check all release branches matching patterns
- Version Detection: Extract version numbers from branch names and report which versions contain changes
- SaaS Version Badges: Real-time deployment status badges showing production/staging/not deployed status from GitLab
- JIRA Integration: Analyze all PRs related to a JIRA ticket including backports
- MCE Validation: Verify commits against MCE GitLab snapshots with SHA extraction
- GA Status Tracking: Analyze General Availability status from Google Sheets
- Real-time Data: Live release schedule updates directly from Google Sheets
- Release Schedule Integration: Parse "In Progress" and "ACM MCE Completed" tabs to determine GA dates
- Version Comparison: Compare MCE/GitHub versions to track changes between releases with required component-specific analysis
- Auto-Update Notifications: Automatically checks for newer versions and prompts users to update
- Multi-Repository Support: Works with
assisted-service,assisted-installer,assisted-installer-agent, andassisted-installer-ui - Flexible Configuration: Support for environment variables, config files, and command-line options
- High Performance: Optimized with caching and parallel processing to minimize API calls
This tool uses Google Sheets API as the exclusive data source for GA (General Availability) release information:
- β Real-time Data: Always uses the latest release schedule from Google Sheets
- π Live Updates: Changes reflect immediately without redeployment
- π Secure Access: Service account authentication for private sheets
- π± Easy Maintenance: Familiar spreadsheet interface for data management
- π No Rebuilds: Update GA data through Google Sheets without touching code
- π Private Sheets: Full support for private Google Sheets with proper authentication
Both environment variables are required for the tool to function:
export PR_BOT_GOOGLE_SERVICE_ACCOUNT_JSON='{"type": "service_account", "project_id": "your-project", ...}'
export PR_BOT_GOOGLE_SHEET_ID="your-google-sheet-id"- β Real-time Updates: Live data from Google Sheets
- β Zero Downtime: Update data without restarting services
- β Collaborative: Multiple users can maintain the release schedule
- β Audit Trail: Google Sheets provides change history
- β Simplified Deployment: No data files to manage
- β Private Access: Works with private sheets through service account authentication
pr-bot --data-source
# Shows your current configuration including Google Sheets setup# Install latest stable release (recommended)
go install github.com/openshift-assisted/pr-bot@latest
# Or install from development branch
go install github.com/openshift-assisted/pr-bot@master
# Add Go bin directory to PATH (if not already done)
echo 'export PATH=$PATH:~/go/bin' >> ~/.bashrc
source ~/.bashrc
# Verify installation
pr-bot -version# Download from GitHub releases (replace VERSION with actual version)
wget https://github.com/openshift-assisted/pr-bot/releases/latest/download/pr-bot-linux-amd64
chmod +x pr-bot-linux-amd64
mv pr-bot-linux-amd64 pr-bot
# Add to PATH
sudo mv pr-bot /usr/local/bin/# Clone repository
git clone https://github.com/openshift-assisted/pr-bot.git
cd pr-bot
# Build the application
go build .
# Configure Google Sheets access (required)
export PR_BOT_GOOGLE_SERVICE_ACCOUNT_JSON='{"type": "service_account", "project_id": "your-project", ...}'
export PR_BOT_GOOGLE_SHEET_ID="your-google-sheet-id"
# Verify configuration
./pr-bot --data-sourceFor project maintainers who can build and release new versions:
- Google Sheets API access (service account JSON and Sheet ID)
- GitHub repository write access
- Being listed in the GitHub Actions workflow conditions
# Clone repository
git clone https://github.com/openshift-assisted/pr-bot.git
cd pr-bot
# Build CLI distribution version
./scripts/build-cli.sh
# For releases, build and release:
./scripts/build-cli.sh
gh release create v0.X.X --title "vX.X.X - Release Title" --notes "Release notes" ./pr-botβ‘ New Architecture Benefits:
- No sensitive data files in the repository
- Real-time data updates without rebuilding
- Simplified build process for all contributors
- Users configure their own Google Sheets access
- Go 1.21 or later (if building from source)
- Git - For local repository cloning (branch/tag checks are done locally, not via API)
- GitHub token (REQUIRED) - For PR info lookups and repo cloning
- GitLab token (REQUIRED) - For SaaS version badges and MCE validation
- JIRA token + email (REQUIRED) - For JIRA ticket analysis (Atlassian Cloud)
- Red Hat VPN connection (REQUIRED) - For accessing internal GitLab and JIRA APIs
- Google Sheets API access (REQUIRED) - For GA release schedule data
- Repo cache directory (REQUIRED) - Set
PR_BOT_REPO_CACHE_DIRfor local git clones (~500MB)
- Go to GitHub Settings > Personal Access Tokens
- Click "Generate new token (classic)"
- Give it a name like "pr-bot"
- Select scopes:
public_repo(for public repos) orrepo(for private repos) - Copy the generated token
- Set it as an environment variable:
- For CLI usage:
export PR_BOT_GITHUB_TOKEN="your_token_here"
- For Slack server usage (add to .env file):
echo "PR_BOT_GITHUB_TOKEN=your_token_here" >> .env
For JIRA ticket analysis, you'll need a JIRA API token from Atlassian Cloud:
-
Get JIRA API Token:
- Go to Atlassian API Tokens
- Click "Create API token"
- Give it a name like "pr-bot"
- Copy the generated token
-
Set as environment variables (both token and email are required):
- For CLI usage:
export PR_BOT_JIRA_TOKEN="your-jira-api-token-here" export PR_BOT_JIRA_EMAIL="your-email@redhat.com"
- For Slack server usage (add to .env file):
echo "PR_BOT_JIRA_TOKEN=your-jira-api-token-here" >> .env echo "PR_BOT_JIRA_EMAIL=your-email@redhat.com" >> .env
- For CLI usage:
Important Notes:
- JIRA is hosted at
redhat.atlassian.net(Atlassian Cloud) - Both
PR_BOT_JIRA_TOKENandPR_BOT_JIRA_EMAILare required (Atlassian Cloud uses Basic Auth) - The token should have read access to JIRA issues
- Used to find cloned tickets and extract GitHub PR URLs from JIRA tickets
- Supports any JIRA project prefix (MGMT, ACM, OCPBUGS, etc.)
For SaaS version deployment badges and MCE snapshot validation (used in PR analysis and version comparison), you'll need a GitLab API token:
-
Get GitLab API Token:
- Go to GitLab Personal Access Tokens
- Click "Add new token"
- Give it a name like "pr-bot"
- Select scope:
read_api(for reading repository files) - Set expiration date (optional)
- Copy the generated token
-
Set as environment variable:
- For CLI usage:
export PR_BOT_GITLAB_TOKEN="your-gitlab-token-here"
- For Slack server usage (add to .env file):
echo "PR_BOT_GITLAB_TOKEN=your-gitlab-token-here" >> .env
- For CLI usage:
Important Notes:
- Required for SaaS version deployment badges (reads deployments.yaml for production/staging status)
- Required for MCE snapshot validation (SHA extraction from down-sha.yaml)
- Used in PR analysis to validate against MCE snapshots
- Enables version comparison features (
-vflag) - Token should have
read_apiscope to access repository files
The tool requires Google Sheets API access using service account authentication for private sheet access:
-
Create Google Cloud Service Account:
- Go to Google Cloud Console
- Create a new project or select an existing one
- Enable the "Google Sheets API" in APIs & Services > Library
- Go to "IAM & Admin" > "Service Accounts"
- Click "Create Service Account"
- Give it a name (e.g., "pr-bot-sheets") and click "Create and Continue"
- Skip the optional roles and click "Done"
-
Generate Service Account Credentials:
- Click on the newly created service account
- Go to the "Keys" tab
- Click "Add Key" > "Create new key"
- Select "JSON" format and click "Create"
- This downloads a JSON file containing your service account credentials
-
Share Google Sheet with Service Account:
- Open the JSON file and find the "client_email" field
- Go to your private Google Sheet (e.g., ACM/MCE release schedule)
- Click "Share" and add the service account email with "Viewer" permission
- Make sure "Notify people" is unchecked
-
Get Google Sheet ID:
- Copy the Sheet ID from the URL:
https://docs.google.com/spreadsheets/d/SHEET_ID_HERE/edit
- Copy the Sheet ID from the URL:
-
Set as environment variables:
- For CLI usage:
export PR_BOT_GOOGLE_SERVICE_ACCOUNT_JSON='{"type": "service_account", "project_id": "your-project", ...}' export PR_BOT_GOOGLE_SHEET_ID="your-google-sheet-id"
- For Slack server usage (add to .env file):
echo "PR_BOT_GOOGLE_SERVICE_ACCOUNT_JSON='your-service-account-json-content'" >> .env echo "PR_BOT_GOOGLE_SHEET_ID=your-google-sheet-id" >> .env
- For CLI usage:
Important Notes:
- Private Sheets: Works with private Google Sheets through service account authentication
- Sheet Structure: Must have "In Progress" and "Completed Releases" tabs
- Required: Both service account JSON and Sheet ID must be configured
- Security: Keep your service account JSON secure and restrict permissions appropriately
- Access: Service account must be shared with the Google Sheet
git clone https://github.com/openshift-assisted/pr-bot.git
cd pr-bot
go mod tidyYou can configure the application using a .env file in the project root:
# Copy the example file
cp env.example .env
# Edit the .env file with your tokens
nano .envThe .env file should contain:
# GitHub Configuration
PR_BOT_GITHUB_TOKEN=your-github-token-here
PR_BOT_GITHUB_OWNER=openshift
PR_BOT_GITHUB_REPOSITORY=assisted-service
PR_BOT_GITHUB_BRANCH_PREFIX=release-ocm-
PR_BOT_GITHUB_DEFAULT_BRANCH=master
# Slack Bot Configuration (OAuth bot token for server mode)
PR_BOT_SLACK_BOT_TOKEN=xoxb-your-bot-token-here
PR_BOT_SLACK_SIGNING_SECRET=your-slack-signing-secret-here # Optional: enables request verification
# GitLab Configuration (for MCE snapshot validation)
PR_BOT_GITLAB_TOKEN=your-gitlab-token-here
# JIRA Configuration (Atlassian Cloud - redhat.atlassian.net)
PR_BOT_JIRA_TOKEN=your-jira-api-token-here
PR_BOT_JIRA_EMAIL=your-email@redhat.com
# Google Sheets Configuration (Required - service account for private sheets)
PR_BOT_GOOGLE_SERVICE_ACCOUNT_JSON='{"type": "service_account", "project_id": "your-project", "private_key_id": "...", "private_key": "-----BEGIN PRIVATE KEY-----\\n...\\n-----END PRIVATE KEY-----\\n", "client_email": "your-service-account@project-id.iam.gserviceaccount.com", "client_id": "...", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://oauth2.googleapis.com/token"}'
PR_BOT_GOOGLE_SHEET_ID=your-private-google-sheet-id-here
# Local Git Cache (Required - for fast branch/tag operations without API rate limits)
PR_BOT_REPO_CACHE_DIR=/path/to/repo-cachemake buildThe tool can be configured through environment variables, config files, or command-line flags.
# GitHub Configuration (Required)
export PR_BOT_GITHUB_TOKEN="your-github-token"
export PR_BOT_GITHUB_OWNER="openshift"
export PR_BOT_GITHUB_REPOSITORY="assisted-service"
export PR_BOT_GITHUB_BRANCH_PREFIX="release-ocm-"
export PR_BOT_GITHUB_DEFAULT_BRANCH="master"
# Slack Bot Configuration (Required for Slack mode)
export PR_BOT_SLACK_BOT_TOKEN="xoxb-your-bot-token-here"
# Google Sheets Configuration (Required for GA data)
export PR_BOT_GOOGLE_SERVICE_ACCOUNT_JSON='{"type": "service_account", "project_id": "your-project", ...}'
export PR_BOT_GOOGLE_SHEET_ID="your-google-sheet-id"
# GitLab Configuration (Optional for MCE validation)
export PR_BOT_GITLAB_TOKEN="your-gitlab-token-here"
# JIRA Configuration (Required for JIRA ticket analysis)
export PR_BOT_JIRA_TOKEN="your-jira-api-token-here"
export PR_BOT_JIRA_EMAIL="your-email@redhat.com"
# Local Git Cache (Required - repos are cloned locally for fast analysis)
export PR_BOT_REPO_CACHE_DIR="/path/to/repo-cache"Create a config.yaml file:
github:
token: "your-github-token"
owner: "openshift"
repository: "assisted-service"
branch_prefix: "release-ocm-"
default_branch: "master"
slack:
bot_token: "xoxb-your-bot-token-here"
gitlab:
token: "your-gitlab-token-here"
jira:
token: "your-jira-token-here"
google:
service_account_json: |
{
"type": "service_account",
"project_id": "your-project",
"private_key_id": "...",
"private_key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n",
"client_email": "your-service-account@project-id.iam.gserviceaccount.com",
"client_id": "...",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token"
}
sheet_id: "your-google-sheet-id"- Repository:
openshift/assisted-service - Branch Prefix:
release-ocm- - Default Branch:
master
The CLI tool automatically checks for updates on startup and provides comprehensive PR analysis.
# Show version and check for updates
pr-bot -version
# Show help
pr-bot
# Enable debug logging for any command
pr-bot -d -pr <PR_URL>Analyze merged PRs from any supported repository:
# Analyze a PR (auto-detects repository)
pr-bot -pr https://github.com/openshift/assisted-service/pull/1234
pr-bot -pr https://github.com/openshift/assisted-installer/pull/100
pr-bot -pr https://github.com/openshift/assisted-installer-agent/pull/200
pr-bot -pr https://github.com/openshift-assisted/assisted-installer-ui/pull/2991
# Just use the PR number if you're in the right repo context
pr-bot -pr 1234Analyze all PRs related to a JIRA ticket (finds backports automatically):
# Full URL
pr-bot -jt https://redhat.atlassian.net/browse/MGMT-20662
# Just ticket ID
pr-bot -jt MGMT-20662# Compare GitHub tag with previous version for specific components
pr-bot -v assisted-service v2.40.1
pr-bot -v assisted-installer v2.44.0
# Compare MCE versions for specific components
pr-bot -v mce assisted-service 2.8.0
pr-bot -v mce assisted-installer 2.8.0Component Selection: For both regular and MCE version comparisons, you must specify which component/repository to analyze:
Available Components:
assisted-service-openshift/assisted-serviceassisted-installer-openshift/assisted-installerassisted-installer-agent-openshift/assisted-installer-agentassisted-installer-ui-openshift-assisted/assisted-installer-ui
Regular Version Comparison: Compares GitHub tags between different releases of the same repository. MCE Version Comparison: Compares component SHAs between MCE snapshots, allowing you to track changes specific to that component between MCE versions.
Note: Component specification is required - there are no defaults to avoid confusion about which repository is being analyzed.
Start the server to enable Slack slash commands:
# Start server (default port 8080)
pr-bot -serverOnce the server is running, use these slash commands in Slack:
# Show help
/info
# Analyze a PR
/pr https://github.com/openshift/assisted-service/pull/1234
# Analyze JIRA ticket
/jt MGMT-20662
# Compare versions (component required)
/version assisted-service v2.40.1
/version assisted-installer v2.44.0
/version mce assisted-service 2.8.0
/version mce assisted-installer 2.8.0Quick Setup:
- Create Slack App: Go to Slack Apps and create a new app
- Add Bot Scopes:
app_mentions:read,channels:read,chat:write,im:read,im:write,commands - Install App: Install to your workspace and copy the Bot User OAuth Token
- Configure Events: Set event URL to
https://your-server.com/slack/events - Add Slash Commands: Create
/info,/pr,/jt,/versionβhttps://your-server.com/slack/commands - Set Token:
PR_BOT_SLACK_BOT_TOKEN=xoxb-your-token
π Detailed Setup Guide: See docs/SLACK_BOT_SETUP.md for complete instructions.
openshift/assisted-serviceopenshift/assisted-installeropenshift/assisted-installer-agentopenshift-assisted/assisted-installer-ui
- assisted-service: Direct SHA extraction from
down-sha.yaml - assisted-installer: Direct SHA extraction from
down-sha.yaml - assisted-installer-agent: Direct SHA extraction from
down-sha.yaml - assisted-installer-ui: Multi-step version extraction via
stolostron/consoleβfrontend/package.jsonβ@openshift-assisted/ui-lib
The tool automatically checks for updates when running CLI commands:
# Example output when a new version is available
$ pr-bot -pr https://github.com/openshift/assisted-service/pull/1234
β οΈ A newer version is available: 0.1.0 (current: 0.0.1)
π¦ Update with: go install github.com/openshift-assisted/pr-bot@latest
π Or download from: https://github.com/openshift-assisted/pr-bot/releases/latest
# Then it continues with normal execution...The update check:
- β Non-blocking: Never fails your command if update check fails
- β Fast: 5-second timeout, won't slow you down
- β Informative: Shows current vs latest version and how to update
- β Automatic: No configuration needed
This happens when ~/go/bin is not in your PATH. The binary is installed correctly but your shell can't find it.
Fix:
# Temporary fix (for current session)
export PATH=$PATH:~/go/bin
# Permanent fix (add to your shell profile)
echo 'export PATH=$PATH:~/go/bin' >> ~/.bashrc
source ~/.bashrc
# Verify it works
pr-bot -versionThe CLI validates that required tokens are exported before running commands that need them:
β Missing required environment variables for CLI mode:
β’ PR_BOT_GITHUB_TOKEN
β’ PR_BOT_GITLAB_TOKEN
β’ PR_BOT_JIRA_TOKEN
π§ To fix this, export the missing variables:
export PR_BOT_GITHUB_TOKEN="your_github_token_here"
export PR_BOT_GITLAB_TOKEN="your_gitlab_token_here"
export PR_BOT_JIRA_TOKEN="your_jira_token_here"Note: Help (pr-bot) and version (pr-bot -version) commands don't require tokens.
This was fixed in v0.0.3. If you see this error, clean your module cache:
# Clear module cache and reinstall
go clean -modcache
go install github.com/openshift-assisted/pr-bot@latestIf you see 403 API rate limit exceeded:
# Make sure you have a GitHub token set
export PR_BOT_GITHUB_TOKEN="your_github_token_here"
# Without a token, you're limited to 60 requests/hour
# With a token, you get 5000 requests/hourIf your IDE shows errors like "No packages found for embedded files" or import issues:
Issue: The embedded package uses build tags, which can confuse IDEs.
For VSCode with Go extension:
// Add to .vscode/settings.json in your project
{
"go.buildTags": "",
"gopls": {
"buildFlags": ["-tags="]
}
}For other editors:
- Default build (no tags) = embedded data version β
- Use
-tags=filesystemfor development with external files - Build tag warnings are normal - both versions build correctly
Verify both work:
go build . # filesystem version (default)
go build -tags=embedded . # embedded version (maintainers only)- Create installation script for your team:
#!/bin/bash
# install-pr-bot.sh
echo "π Installing pr-bot..."
# Install latest version
go install github.com/openshift-assisted/pr-bot@latest
# Verify installation
pr-bot -version
echo "β
Installation complete!"
echo "π Next steps:"
echo "1. Set up your tokens via export:"
echo " export PR_BOT_GITHUB_TOKEN='your_github_token_here'"
echo " export PR_BOT_GITLAB_TOKEN='your_gitlab_token_here'"
echo " export PR_BOT_JIRA_TOKEN='your_jira_token_here'"
echo "2. Test with: pr-bot -pr <PR_URL>"- Docker deployment (recommended):
# Dockerfile
FROM golang:1.21-alpine AS builder
WORKDIR /app
COPY . .
RUN go build -o pr-bot .
FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /root/
COPY --from=builder /app/pr-bot .
COPY --from=builder /app/VERSION .
COPY --from=builder /app/data ./data
EXPOSE 8080
CMD ["./pr-bot", "-server"]- Kubernetes deployment:
apiVersion: apps/v1
kind: Deployment
metadata:
name: pr-bot
spec:
replicas: 2
selector:
matchLabels:
app: pr-bot
template:
metadata:
labels:
app: pr-bot
spec:
containers:
- name: pr-bot
image: your-registry/pr-bot:latest
ports:
- containerPort: 8080
env:
- name: PR_BOT_GITHUB_TOKEN
valueFrom:
secretKeyRef:
name: pr-bot-secrets
key: github-token
# ... other environment variables./pr-bot -d -pr https://github.com/openshift/assisted-service/pull/1234Debug mode provides detailed logging including:
- Configuration values at startup
- Google Sheets API parsing progress
- GA status analysis steps
- GitHub API request details
- Release branch matching logic
./pr-bot=== PR Analysis Summary ===
PR #1234: Fix authentication bug in installer
Hash: a1b2c3d4e5f6
Merged to 'master' at: 2024-01-15 10:30:00 +0000 UTC
URL: https://github.com/openshift/assisted-service/pull/1234
=== Release Branch Analysis ===
β Found in 3 release branches:
- release-ocm-2.13 (version 2.13) - merged at 2024-01-16 14:20:00 +0000 UTC
GA Status:
ACM 2.13.3: GA (GA: 2024-01-10)
MCE 2.8.2: GA (GA: 2024-01-10)
- release-ocm-2.14 (version 2.14) - merged at 2024-01-17 09:15:00 +0000 UTC
GA Status:
ACM 2.14.1: Next Version (GA: 2024-02-15)
MCE 2.9.1: Merged but not GA
- release-ocm-2.15 (version 2.15) - merged at 2024-01-18 11:45:00 +0000 UTC
GA Status:
ACM 2.15.0: Not Found
MCE 2.10.0: Not Found
β Not found in 2 release branches:
- release-ocm-2.10 (version 2.10)
- release-ocm-2.11 (version 2.11)
Analysis completed at: 2024-01-20 16:30:00 +0000 UTC
- GA: The change is included in a Generally Available release
- Next Version: The change was merged after the GA date, so it will be in the next version
- Merged but not GA: The change is merged but no GA date is available yet
- Not Found: No release information found for this version
All changes require maintainer approval before merging.
- π Open issues for discussions and feature requests
- π Submit PRs for code changes - all PRs require review
- β³ Wait for approval - no self-merging allowed
- π« No direct pushes - all changes go through PR process
Contact the repository maintainer for questions or urgent changes.
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a PR with clear description
- Wait for maintainer approval
pr-bot/
βββ main.go # Main application entry point
βββ internal/
β βββ config/ # Configuration management
β βββ github/ # GitHub API client
β βββ ga/ # GA status parsing
β βββ logger/ # Logging utilities
β βββ models/ # Data models
β βββ slack/ # Slack API client
βββ pkg/
β βββ analyzer/ # Core analysis logic
βββ scripts/ # Build and utility scripts
βββ go.mod # Go module definition
βββ Makefile # Build automation
βββ README.md # This file
# Show available commands
make help
# Build the application
make build
# Run tests
make test
# Format code
make fmt
# Run linter
make lint
# Run all checks
make check
# Clean build artifacts
make cleanThe project follows Go best practices with a clean architecture:
- Models (
internal/models/): Define data structures - GitHub Client (
internal/github/): API interaction layer - Analyzer (
pkg/analyzer/): Business logic - Configuration (
internal/config/): Configuration management - CLI (
main.go): Command-line interface - GA Parser (
internal/ga/): Google Sheets parsing for release tracking
- Without GitHub token: 60 requests per hour
- With GitHub token: 5,000 requests per hour
For production use, always configure a GitHub token.
If you have issues with the Slack bot:
- Check bot token: Ensure
PR_BOT_SLACK_BOT_TOKENis set correctly - Verify scopes: Make sure all required bot scopes are configured
- Check installation: Ensure the app is installed to your workspace
- Test endpoints: Verify your server is accessible at the configured URLs
- Use debug mode: Run with
-dflag to see detailed error messages:./pr-bot -server -d
See docs/SLACK_BOT_SETUP.md for detailed troubleshooting.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Run
make checkto ensure quality - Submit a pull request
This project is licensed under the MIT License.
- JSON output format
- Support for multiple repository analysis
- Batch PR analysis
- Web interface
- Database persistence
- Notification integration (Slack, email)
- CI/CD pipeline integration