Problem
Currently, the PR welcome message only displays built-in commands (/retest, /cherry-pick, /lgtm, /approve, etc.). Some teams have external tooling, bots, or workflows that respond to custom PR comment commands (e.g., /deploy-staging, /run-integration-tests, /preview). There's no way to document these in the welcome message, so contributors either don't know about them or maintainers have to manually explain them.
Proposed Solution
Add a custom-commands configuration option (global and per-repo) that lets users define custom commands with descriptions. These are rendered in a new Custom Commands section in the PR welcome message.
Config example (in config.yaml or .github-webhook-server.yaml):
custom-commands:
- name: deploy-staging
description: Deploy this PR to the staging environment
- name: run-e2e
description: Trigger end-to-end test suite against this PR
- name: preview
description: Generate a preview deployment URL
Welcome message output (new section under "Available Commands"):
#### Custom Commands
* `/deploy-staging` - Deploy this PR to the staging environment
* `/run-e2e` - Trigger end-to-end test suite against this PR
* `/preview` - Generate a preview deployment URL
Key design points:
- These are documentation-only — the server renders them in the welcome message but does NOT process them as commands. External bots/tools handle them independently.
- Section is only rendered when
custom-commands is configured and non-empty.
- Supports both global config and per-repo override.
Affected Files
| File |
Change |
webhook_server/config/schema.yaml |
Add custom-commands schema definition |
webhook_server/libs/handlers/pull_request_handler.py |
Add _prepare_custom_commands_welcome_section property, include in _prepare_welcome_comment() |
examples/config.yaml |
Add commented example |
Done
Problem
Currently, the PR welcome message only displays built-in commands (
/retest,/cherry-pick,/lgtm,/approve, etc.). Some teams have external tooling, bots, or workflows that respond to custom PR comment commands (e.g.,/deploy-staging,/run-integration-tests,/preview). There's no way to document these in the welcome message, so contributors either don't know about them or maintainers have to manually explain them.Proposed Solution
Add a
custom-commandsconfiguration option (global and per-repo) that lets users define custom commands with descriptions. These are rendered in a new Custom Commands section in the PR welcome message.Config example (in
config.yamlor.github-webhook-server.yaml):Welcome message output (new section under "Available Commands"):
Key design points:
custom-commandsis configured and non-empty.Affected Files
webhook_server/config/schema.yamlcustom-commandsschema definitionwebhook_server/libs/handlers/pull_request_handler.py_prepare_custom_commands_welcome_sectionproperty, include in_prepare_welcome_comment()examples/config.yamlDone
custom-commandsschema towebhook_server/config/schema.yaml_prepare_custom_commands_welcome_sectionproperty toPullRequestHandler_prepare_welcome_comment()examples/config.yaml