Command Bot - Help Docs
Based on https://github.com/paritytech/command-bot-scripts/tree/main
rev: bd105b00b5aafda6a91ed813d522bd2b2a846664
Running custom commands, like:bot command-name -v VAR=value id --argument=1 --argument=2
Or even multiple commands in one comment:bot clean
bot command-name --argument=2
bot command-name --argument=3
To add a new command:
- Go to https://github.com/paritytech/command-bot-scripts/
- Add new command and open a PR.
- Read how to test the new command before merging.
- Merge. Then after merging the PR, it will be accessible without branch override.
help
Generates the help page & provides a link.
Example: bot help
clean
Clears bot comments in the PR.
bot clean
Works in all repos
Clears all bot comments in the PR, including human comments requesting a command-bot.
Default: falseExample: bot clean
bench-all
This is a wrapper to run `bench` for all pallets. In order to skip merging master - add `-v UPSTREAM_MERGE=n` to env variables
bot bench-all pallet
Works in these repos: polkadot-sdk
Default static args:
Example: bot bench-all pallet --pallet=pallet_name
bot bench-all substrate
Works in these repos: polkadot-sdk
Default static args:
- target_dir: substrate
- features: riscv
Example: bot bench-all substrate
bot bench-all polkadot
Works in these repos: polkadot-sdk
Default static args:
- target_dir: polkadot
- features: riscv
Example: bot bench-all polkadot
bot bench-all cumulus
Works in these repos: polkadot-sdk
Default static args:
- target_dir: cumulus
Example: bot bench-all cumulus
bench-overhead
Run benchmarks overhead and commit back results to PR. In order to skip merging master - add `-v UPSTREAM_MERGE=n` to env variables
bot bench-overhead
Works in these repos: polkadot-sdk
Default static args:
- target_dir: polkadot
Example: bot bench-overhead
bot bench-overhead substrate
Works in these repos: polkadot-sdk
Default static args:
- target_dir: substrate
Example: bot bench-overhead substrate
bot bench-overhead cumulus
Works in these repos: polkadot-sdk
Default static args:
- target_dir: cumulus
Example: bot bench-overhead cumulus
bench
Runs `benchmark pallet` or `benchmark overhead` against your PR and commits back updated weights. In order to skip merging master - add `-v UPSTREAM_MERGE=n` to env variables
bot bench substrate-pallet
Works in these repos: polkadot-sdk
Default static args:
- subcommand: pallet
- runtime: dev
- target_dir: substrate
- features: riscv
Example: bot bench substrate-pallet --pallet=pallet_name
bot bench polkadot-pallet
Works in these repos: command-bot-testpolkadot-sdk
Default static args:
- target_dir: polkadot
Example: bot bench polkadot-pallet --pallet=pallet_name
bot bench cumulus-assets
Works in these repos: polkadot-sdk
Default static args:
- runtime_dir: assets
- target_dir: cumulus
Example: bot bench cumulus-assets --pallet=pallet_name
bot bench cumulus-collectives
Works in these repos: polkadot-sdk
Default static args:
- runtime: collectives-westend
- runtime_dir: collectives
- target_dir: cumulus
Example: bot bench cumulus-collectives --pallet=pallet_name
bot bench cumulus-coretime
Works in these repos: polkadot-sdk
Default static args:
- runtime_dir: coretime
- target_dir: cumulus
Example: bot bench cumulus-coretime --pallet=pallet_name
bot bench cumulus-bridge-hubs
Works in these repos: polkadot-sdk
Default static args:
- runtime_dir: bridge-hubs
- target_dir: cumulus
Example: bot bench cumulus-bridge-hubs --pallet=pallet_name
bot bench cumulus-contracts
Works in these repos: polkadot-sdk
Default static args:
- runtime: contracts-rococo
- runtime_dir: contracts
- target_dir: cumulus
Example: bot bench cumulus-contracts --pallet=pallet_name
bot bench cumulus-glutton
Works in these repos: polkadot-sdk
Default static args:
- subcommand: pallet
- runtime_dir: glutton
- target_dir: cumulus
Example: bot bench cumulus-glutton --pallet=pallet_name
bot bench cumulus-starters
Works in these repos: polkadot-sdk
Default static args:
- runtime_dir: starters
- target_dir: cumulus
Example: bot bench cumulus-starters --pallet=pallet_name
bot bench cumulus-people
Works in these repos: polkadot-sdk
Default static args:
- runtime_dir: people
- target_dir: cumulus
Example: bot bench cumulus-people --pallet=pallet_name
bot bench cumulus-testing
Works in these repos: polkadot-sdk
Default static args:
- runtime_dir: testing
- target_dir: cumulus
Example: bot bench cumulus-testing --pallet=pallet_name
fmt
FMT. Formatting Rust code + Toml according to style guidelines and commits to your PR.
Example: bot fmt
sync
Sync chain https://github.com/paritytech/command-bot/issues/177
bot sync
Works in these repos: polkadot-sdk
Default static args:
Example: bot sync
update-ui
Update UI tests, e.g. after a rust toolchain upgrade, and commit them to your PR.
bot update-ui
Works in these repos: polkadot-sdk
Example: bot update-ui
bot update-ui latest
Works in these repos: polkadot-sdk
Example: bot update-ui latest --rust_version=1.70
Patch Companion
Syntax (after command name):
-v PATCH_repo=pull_request_id
Examples:
bot bench -v PATCH_substrate=11341 polkadot-overhead --network=westend-dev
bot try-runtime -v PATCH_polkadot=3341 polkadot --network=westend
Test new command.
When you create/modify a command in https://github.com/paritytech/command-bot-scripts/tree/main repo, you can test it before merging to master
Syntax (after command name):
-v PIPELINE_SCRIPTS_REF=your_branch
Examples:
bot new-command -v PIPELINE_SCRIPTS_REF=mak/new-command new-id --new-arg=value
Override Command's CI Image
You can override command's CI image with any other image, for example when you need to test new version of Rust
Syntax (after command name):
-v CMD_IMAGE=paritytech/ci-unified:bullseye-1.77.0-2024-04-10-v20240408
Examples:
bot update-ui -v CMD_IMAGE=paritytech/ci-unified:bullseye-1.77.0-2024-04-10-v20240408 --rust_version=1.77.0
Rust Log, etc
You can define custom env variables like for RUST env
Syntax (after command name):
-v RUST_LOG=remote-ext=debug,runtime=trace
Examples:
bot try-runtime -v RUST_LOG=remote-ext=debug,runtime=trace polkadot --network=westend