- Labels new PRs as "ready for review"
- Adds "approved" label when PR is approved
- Adds "changes requested" when changes are requested
- Adds "merged" label to merged PRs
- Adds "fixed" label to closed bug issues
- Adds "implemented" label to closed feature/enhancement issues
Use these commands in PR/issue comments:
/approve
- Approve a pull request/merge
- Merge a pull request/close
- Close an issue or pull request/wip
- Mark as work in progress/label <name>
- Add labels/request-info
- Request more information
- Requests more information when issue descriptions are too short
- Welcomes first-time contributors
- Manages labels based on PR/issue status
- Automatically removes labels when conditions change
- Install the GitHub App
- Grant access to your repositories
- Optionally create a config file (see Configuration section)
-
Approve PR
/approve
Approves the pull request (requires write access)

-
Merge PR
/merge
Merges the pull request using rebase strategy (requires write access)

-
Close
/close
Closes a issue/PR
-
Add Labels
/label bug documentation
Adds one or more labels to the issue/PR

-
Work in Progress
/wip
Marks PR as work in progress

- Request Information
Requests additional information from the author
/request-info

The bot includes several automatic behaviors that can be enabled or disabled:
-
Request more info (
requestMoreInfo
)- Request more information from user when description is too short
- Triggers on: Issue opened

-
Ready for Review (
addReadyForReview
)- Adds "ready for review" label to new pull requests
- Triggers on: Pull request opened

-
Approval Labels (
addApprovedLabel
)- Adds "approved" label when PR is approved
- Removes "changes requested" label if present
- Triggers on: Pull request review submitted

-
Changes Requested (
addChangesRequestedLabel
)- Adds "changes requested" label when changes are requested
- Removes "approved" and "ready for review" labels
- Triggers on: Pull request review submitted

-
Merged Label (
addMergedLabel
)- Adds "merged" label when PR is merged
- Removes review-related labels
- Triggers on: Pull request closed (merged)

- Welcome Messages (
welcomeContributor
,welcomeIssue
)- Welcomes first-time contributors
- Provides helpful onboarding information
- Triggers on: First PR or issue

Create a .github/repo-command.yml
file in your repository:
# Minimum length required for issue/PR descriptions
minBodyLength: 50
# Enable/disable commands
commands:
wip: true
approve: true
close: true
label: true
merge: true
requestInfo: true
# Enable/disable automations
automations:
addReadyForReview: true
addApprovedLabel: true
addChangesRequestedLabel: true
addMergedLabel: true
requestMoreInfo: true
addLabelsOnClose: true
welcomeContributor: true
welcomeIssue: true
# Configure labels
labels:
wip: "work in progress"
readyForReview: "ready for review"
approved: "approved"
changesRequested: "changes requested"
needsMoreInfo: "needs more info"
merged: "merged"
bug: "bug"
feature: "feature"
enhancement: "enhancement"
fixed: "fixed"
implemented: "implemented"
# Configure messages
messages:
welcomeContributor: |
Thanks for your first pull request, @{user}! π
The team will review your changes soon.
welcomeIssue: |
Thanks for opening your first issue, @{user}! π
requestMoreInfo: |
Hey @{user}! Please provide more details in your {type}.
moreInfoAdded: |
Thanks @{user} for adding more information!
- Node.js >= 16
- npm or yarn
- A GitHub account
- Clone the repository
git clone [email protected]:aayushchugh/repo-command.git
cd repo-command
- Install dependencies
npm install
- Create a
.env
file:
APP_ID=your_app_id
PRIVATE_KEY=your_private_key
WEBHOOK_SECRET=your_webhook_secret
- Start the bot
npm run dev
Run using Docker:
# Using Docker Compose
docker compose up -d
# Or using Docker directly
docker build -t repo-command .
docker run -d \
-p 3000:3000 \
--env-file .env \
--name repo-command \
repo-command
Contributions are welcome! Please read our Contributing Guide.
For support:
- Open an issue
- Email: [email protected]
MIT Β© Ayush Chugh
docker run -d
-p 3000:3000
--env-file .env
--name repo-command
repo-command
The bot will be available at `http://localhost:3000`.