Skip to main content
A user with write access to the repository can type a command in a pull request comment and Levelrail runs it for the app connected to that repository. The feature is off for every app until you turn it on. Commands are GitHub only for now. They need the GitHub App connection, because Levelrail asks GitHub who the commenter is.

Commands

A command is a comment line that starts with the command at the first column, outside a code block. Case does not matter. Anything else on the line makes it a normal comment. Send one command per comment. A comment with two commands runs neither. There is no way to name an app in the comment: the app is the one whose webhook received the event.

Turn it on

Open the app, then Previews, and use Pull request commands. A second switch allows commands on pull requests from forks and stays off unless you enable it.
The webhook on the repository must also deliver the Issue comments event. Add it in the repository’s webhook settings next to the push and pull request events. Levelrail does not change an existing webhook for you.

Environment

What happens on a comment

  1. The webhook signature is verified with the same per-app secret as push deploys. An unsigned or wrongly signed delivery is rejected with 401.
  2. The kill switch and the app setting are checked. Off means the event is ignored.
  3. Only a newly created comment on a pull request counts. Edits, deletes and plain issues are ignored.
  4. Comments from bots, from GitHub Apps, and comments carrying Levelrail’s own reply marker are ignored.
  5. The comment id is recorded. A redelivered webhook, or an operator replay, finds it already handled and does nothing.
  6. The per-user and per-pull-request limits are applied before any call to GitHub.
  7. Levelrail asks GitHub for the commenter’s permission with the GitHub App token. Only write and admin pass. Any error, including a timeout or a 403, refuses the command. A commenter who fails this check gets no reply.
  8. Levelrail reads the pull request from GitHub, not from the webhook body. It must be open, and its head repository must be the connected repository unless fork commands are on.
  9. The command runs through the same code as the dashboard and records the trigger as pr_comment with the GitHub login as the actor, on the deploy attempt where one is created and always on the app timeline.
  10. One short comment is posted with the outcome.

Threat model

Secrets are never logged or echoed. Logs carry the app name, pull request number and GitHub login.

What it does not do

  • It does not deploy the pull request’s code. redeploy deploys the tracked branch.
  • It does not approve a deploy or override a freeze. Use the dashboard for those.
  • It does not run for GitLab, Bitbucket or Gitea.
  • It does not edit your repository’s webhooks.
  • It does not accept a command from someone who only has read or triage access.
Last modified on October 25, 2026