Mention @sparrowcodes in an issue or pull request and it does the work

One command adds a GitHub Actions workflow to your repository. After that, a comment like "@sparrowcodes fix the failing test" starts the agent, and it pushes the change and replies in the thread.

· 3 min read · SparrowCodes team

Some fixes are too small to open your editor for: a failing test, a typo in the docs, a review comment you agree with. Now you can leave them in a comment. Write @sparrowcodes and what you want in an issue or a pull request, and the SparrowCodes agent does it in GitHub Actions.

Set it up once

Inside your repository, with the SparrowCodes CLI installed:

terminal
sparrowcodes github install

This writes one file, .github/workflows/sparrowcodes.yml. Then two more steps:

  • Add your API key as the repository secret SPARROWCODES_API_KEY (Settings → Secrets and variables → Actions). Create a key in your dashboard. With the GitHub CLI signed in, the command prints the gh secret set line for you.
  • Commit and push the workflow.

Use it

Mention it in any issue or pull request comment, for example:

comment
@sparrowcodes fix the failing test in this PR

Here is what happens next:

  • It reacts with 👀 and posts a "working on it" comment that links to the run.
  • On a pull request, it checks out that branch. On an issue, it starts a new branch and opens a pull request when it is done.
  • It reads the whole thread (the title, the description and your comment) and, on a pull request, the list of changed files. A comment on a line of code tells it which file and line you mean.
  • It makes the change, runs the project's checks when there are any, then commits and pushes.
  • The "working on it" comment turns into a short summary: what it did and what you should check.

Questions and reviews work too. Ask "@sparrowcodes why does this break on Windows?" and it answers in the thread without changing anything.

Who can start it

Each run is paid for by the key in the repository secret, so only people who can push to the repository can start one. Mentions from anyone else, and from bots, are ignored. On a pull request from a fork it can't push, so it replies with explanations and suggested code instead of editing files.

It needs version 0.2.0-beta.4 or later. Update with npm i -g sparrowcodes, or start with the free plan.

Mention @sparrowcodes in an issue or pull request and it does the work · SparrowCodes