https://github.com/paritytech/command-bot-scripts
https://github.com/paritytech/command-bot-scripts
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/paritytech/command-bot-scripts
- Owner: paritytech
- Created: 2022-11-15T18:29:22.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-11-07T16:48:27.000Z (over 1 year ago)
- Last Synced: 2025-09-02T00:35:36.418Z (9 months ago)
- Language: Shell
- Size: 295 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# Commands & Scripts implementation for [command-bot](https://github.com/paritytech/command-bot/)
## How to add command?
⚠️ Please, _do not fork_, instead create a dev branch in scope of current repo. This will allow you to test your branch before merging.
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 install `command-bot` dependency, which includes the actual supported schema for commands validation.
If you develop in parallel with `command-bot` then use something like `yarn link`
- Copy any existing command which looks the most similar.
- Change the name of command. The structure should be `/commands//.cmd.json` and `/commands//.sh`, because the `command_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`
- 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
## How does it work with companion PRs ?
To make a context of companion you need to specify it with special env variable `-v PATCH_=`, for example: `-v PATCH_substrate=11649`
Example:
`bot try-runtime -v PATCH_substrate=11649 $ polkadot`
## Some command might automatically refresh (merge) from "master"
To disable this, add `-v UPSTREAM_MERGE=n`, example: "bot bench-vm -v UPSTREAM_MERGE=n $ all"