Skip to content
All articles

AI Workflow • 7 min read

Migration by GitHub issue: how non-developers ran an AI migration

Bruce | OSBR •

In the first post of this series we described how we moved a client's 700-page website onto a new design system with Claude Code skills and agents. That post ended with a promise: to explain how people who don't write code ran the migration themselves.

At the start, a migration ran on a developer's machine. Someone opened a terminal, started Claude Code on their own subscription, pointed it at a file and committed the result. That was fine for one person testing. But most of the people checking pages were not developers, and we wanted a record of who asked for what and what each run cost.

So in late April we moved the migration onto GitHub. You fill in an issue form, a GitHub Action runs Claude Code, and a pull request comes back. This post covers the form, the guard rails around it, and what happens when a run fails.

One form, one class

The main form asks for very little. An issue type: not-yet-migrated for a new request, or migrated-wrong to report a bad result. A CSS class name: the old class to migrate, such as _list-01. Optionally, one file, and free-text details.

Submitting the form adds a migrate label, and the label starts the workflow. The workflow finds every old page that uses the class, migrates that one class on each page, and leaves every other old class alone. It commits the result to a branch, opens one pull request linked to the issue, and posts the link back on the issue.

The one-class scope was deliberate. One issue is one change a reviewer can keep in their head: "every _list-01 list now uses the new list component". It also keeps each run's cost bounded. A run handles at most 20 files by default, and a class used on more pages is split into batches, which we covered in the post on cost.

Some problems don't belong to one class: a block built from three old components, a <div> with no class at all, or just "this part of the page looks wrong". For those, a second form asks for a file, a block location (a selector, a line range, a pasted snippet or a screenshot) and a description of what's wrong. The workflow re-migrates that one file and passes the description to the AI as extra context.

Diagram of the issue-driven migration: issue form, label, authorization, Claude Code run, preview deploy and pull request, then review and failure handling
From issue form to pull request. People fill in the form and review the result. The workflow and Claude Code do the rest.

What the reviewer gets

The pull request arrives within minutes. Across 78 successful runs, the median time from filing the issue to the bot's comment with the pull request link was about 8 minutes, and 70 of them took 15 minutes or less.

The pull request description carries:

  • One preview link per page. The workflow builds the migrated pages and deploys them to a preview site before it opens the pull request, so the links are there from the start. Our first version linked to an index page, which cost reviewers an extra click, so we replaced it.
  • A password in front of everything. The preview site holds the client's pages, so every request, including images and CSS, asks for a username and password. If the credentials aren't configured, the site serves nothing rather than serving the pages openly.
  • Counts, not just "Succeeded". Early pull requests said "Succeeded" whenever a run finished. Two went through review that way although neither had converted a single block with high confidence. Now the description shows how many blocks were converted with high confidence, medium confidence, left as manual or skipped. A run that converted nothing is obvious without opening a file.
  • Both languages. Form labels, pull request descriptions and every bot comment are in English and Japanese: English first, then Japanese below a line.

If the pages look right, the reviewer merges. If not, they leave the pull request alone and file a new issue. That's the subject of the next post.

Guard rails

The workflow spends money on a shared API key and writes to the repository. A few rules kept that safe.

  • Who can start a run. When the person who filed the issue is also the one who added the label, which is what the form does automatically, they must be an owner, member or collaborator on the repository. Anyone else gets a comment asking a maintainer to start the run. The maintainer does that by adding the migrate label themselves. GitHub only lets people with triage permission add labels, so adding it is the approval.
  • One migration at a time. Two runs that touch the same pages produce pull requests that conflict, and one can overwrite the other's changes. The rule in the README is plain: file the next issue only after the previous pull request is merged.
  • Every change goes through an issue. Nobody edits files in a migration pull request. A hand edit leaves no record of what was wrong, and the preview no longer matches the code.

When a run fails

Our second pilot run found a bug straight away. The form adds the label when the issue is created, and GitHub reports that as two events: "issue opened, with a label" and "label added". The workflow listened for both, so every issue started two runs. The first opened the pull request. The second would find the branch already there, fail, post "Migration failed" on the issue and add a failed label to an issue that had worked. We changed the workflow to listen only for "label added".

Real failures are marked the same way: the workflow adds the failed label and comments with a link to the run log. At first that comment only said "Migration failed" and the reason was buried in the log. Now the first line of the comment is the reason, in both languages.

Some failures are form mistakes. In one case a teammate put the new component's class in the class field instead of the old one. The workflow rejected it before calling the AI, with Class name must start with an underscore. The fix was to file the issue again with the old class name.

For the person who filed the issue, the rule of thumb is short:

  • Read the first line of the bot's comment. If it names a field, fix that field and file again.
  • If it points at the system, such as an API or deploy error, send the run link to a maintainer.
  • If only some files failed, the pull request still opens and lists the failed files, so the rest can be reviewed.

How much it was used

Between 24 April and 13 June, four people on the team filed 91 migration issues through the form. 15 of them were migrated-wrong reports. In the same period, 102 pull requests opened by the workflow were merged.

In mid June, for the final push, we changed the unit of work from one class to one page, as described in the first post. The issue stayed the entry point. Each page got an issue holding its migration plan, and a person approved the plan before the AI rewrote the page.

What we learned

  • A form is an interface. Four fields and a submit button are enough to start a migration. Nobody needs a terminal.
  • Put the reason in the first line. A comment that only says "failed" sends people to a log they won't read. One that names the wrong field lets them fix it themselves.
  • Show what the AI actually did. "Succeeded" hid runs that changed nothing. Counts made them obvious.
  • Write the boring rules down. One migration at a time, no edits in the pull request. Both came from real problems, and both cost nothing to follow.

Planning a migration of your own? Read the case study, or tell us about your site.

Chat with our AI assistant