Commands
The comment commands Axon Shaft runs on, who can run them, where they work, and the reactions that show a run's progress.
A comment starts Axon Shaft when one of its lines starts with a command. Mentioning @axonshaft starts nothing.
| Command | What it does | Who can run it |
|---|---|---|
/review | Reviews the pull request's latest commit now. | Write access |
/ask <question> | Answers a question about the code, citing file:line, and changes nothing. | Write access |
/fix | Fixes the last review's open findings, or what you write after it, and pushes one commit. | Write access |
/axonshaft <prompt> | Anything else: Axon Shaft answers, or makes the change and pushes it. | Write access |
/help | Posts the commands and the settings a review on the repo uses. | Anyone |
Who can run them
The commenter needs write access to the repo: admin or write, where maintain counts as write. The action asks GitHub, and the API checks again. Anyone else's command starts nothing, and the run ends with no_write_access. /help works for anyone.
Comments from bots never start a run, Axon Shaft's own included.
What counts as a command
- The command starts a line of the comment. Spaces before it are fine.
- A command in a quote (
>), in inline code or in a code block doesn't count, so quoting someone's command doesn't run it again. - A longer word such as
/reviewerdoesn't count. - Another bot that uses the same command starts too.
Where they work
| Where | /review, /ask, /help | /fix, /axonshaft |
|---|---|---|
| The pull request's Conversation tab | Yes | Yes |
| A comment on a line of the diff | Yes | No |
| A review's body | Yes | No |
| An issue | /help only | No |
GitHub runs a comment in a review from the pull request's merge commit, so the workflow there isn't the default branch's, and the API refuses to make a change from it. /review, /ask, /fix and /axonshaft on an issue end with not_a_pull_request.
On a paused project, no command runs, /help included.
Reactions
axonshaft[bot] reacts to the comment that started a run:
- 👀 when the run starts. For every command but
/help, it comes after the write access check, so a comment from someone without write access gets no reaction. - When the run ends, the 👀 is replaced with 🚀 if the run did its job (for
/ask, once the answer is posted), or 😕 if it failed or did nothing.
GitHub has no reactions on a review's body, so a command there gets none. A dry run logs the reactions and adds none.
The automations behind them
Each command runs one of the project's automations: /review the Code review, /ask the Reply, and /fix and /axonshaft the Task. Every project starts with all three on. Turning one off in the Automations tab turns its command off, and the run ends with a notice that says so. /ask and /fix need action 1.6 or later.
Last updated on