Skip to main content

Using the Code Command

The /code command is the primary way to interact with Codestodian from Slack. It provides a set of subcommands for checking builds, browsing pull requests, viewing repository summaries, and generating reports.

All subcommands except help require a linked git account. If you haven't linked your account yet, Codestodian will prompt you with a mapping modal when you first run a command.

When a subcommand is run without arguments, Codestodian opens an interactive modal. When arguments are provided, the response is posted as an ephemeral message visible only to you.

Build

Check the build status of a repository.

/code build [repo] [ref]
  • repo — the name of the repository
  • ref (optional) — a branch name, commit SHA, or tag. Defaults to the repository's default branch if omitted.

Examples:

  • /code build my-repository — build status for the default branch
  • /code build my-repository my-awesome-branch — build status for a specific branch
  • /code build my-repository abc1234 — build status for a specific commit
  • /code build my-repository v1.0.0 — build status for a specific tag

Pull Requests

List pull requests for a repository with optional filters.

/code prs [repo] [author] [date]
  • repo — the name of the repository
  • author (optional) — a git username to filter by
  • date (optional) — an ISO date (e.g. 2023-04-02) to show pull requests older than the given date

Examples:

  • /code prs my-repository — all open pull requests
  • /code prs my-repository my-awesome-colleague — pull requests by a specific author
  • /code prs my-repository 2023-04-02 — pull requests older than a date
  • /code prs my-repository my-awesome-colleague 2023-04-02 — filtered by both author and date

Repository Summary

View a summary of a repository including its latest pull requests.

/code repo [repo]
  • repo — the name of the repository

Examples:

  • /code repo my-repository

Standup

Generate a team standup report. This command is modal-driven — running it opens a team selector where you choose which team to report on.

/code standup

The report includes:

  • Opened PRs — pull requests opened by team members, including review requests
  • Reviewed PRs — pull requests reviewed by team members, including approvals and dismissals
  • Closed PRs — pull requests merged or closed by team members

The reporting window is based on the current day. On Mondays, the report covers the previous Friday. On all other days, it covers the previous day.

Summary

Get your personal daily summary.

/code summary

This command has no arguments and always posts an ephemeral message. It includes:

  • Reviews requested from you
  • Pull requests assigned to you
  • Your open pull requests

Help

Show usage help for all available subcommands.

/code help

Each subcommand also has its own help variant:

/code build help
/code prs help
/code repo help