This is implemented in `llvm/utils/git/github-automation.py`. People can't write `/cherry-pick: foobar`, because the colon breaks the script. The same is true for `/branch`.