Commands & Scripts implementation for command-bot
For now just copy existing command and modify. Later there will be more ways to do this easier from the bot itself or here via CLI.
- clone scripts & bot into the same folder
git clone https://github.com/paritytech/command-bot.git
git clone https://github.com/paritytech/command-bot-scripts.git
cd ./command-bot-scripts
- Run
yarn --immutable
to installcommand-bot
dependency, which includes the actual supported schema for commands validation. If you develop in parallel withcommand-bot
then use something likeyarn link
- Copy any existing command which looks the most similar.
- Change the name of command. The structure should be
/commands/<command_name>/<command_name>.cmd.json
and/commands/<command_name>/<command_name>.sh
, because thecommand_name
will be used to build a path from command to script. - Test it in your PR:
- when running a new command - add specific flag (-v PIPELINE_SCRIPTS_REF=your-branch) to test it before merge.
Example:bot new-command -v PIPELINE_SCRIPTS_REF=your-branch $ some arguments
- when running a new command - add specific flag (-v PIPELINE_SCRIPTS_REF=your-branch) to test it before merge.
- In PR with your new command - add test evidence links to your PR with the result of your command and merge after approval.
- That's it
To make a context of companion you need to specify it with special env variable -v PATCH_<repo_name>=<repo_PR_number>
, for example: -v PATCH_substrate=11649
Example:
bot try-runtime -v PATCH_substrate=11649 $ polkadot
To disable this, add -v UPSTREAM_MERGE=n
, example: "bot bench-vm -v UPSTREAM_MERGE=n $ all"