A pull request puts the agent's code changes on a branch of your repository, where your engineers review and merge them. Create it once the change looks right in Build Mode. One canvas has one pull request.
Before you start
A canvas of a codebase connected to GitHub, see Connect a GitHub repository. The demo codebase has no repository.
At least one code change, see See the code the agent changed.
Steps
In Build Mode, click Sync to Github above the message field. The button appears next to the Changes count after the agent's first change.
Wait while it reads Syncing…. The agent writes the title and description from the changes.
When it reads Synced, the pull request exists. The GitHub button in the header gets a green dot.
The strip disappears a moment later. From now on, click the GitHub button in the header and then View on Github to open the pull request for your engineers.
Write the title yourself
To edit the text before the pull request is created, use the header instead of the strip.
Click the GitHub button in the canvas header. The Github Sync popover opens.
Click Sync to Github. The Create Pull Request dialog opens with a Title and Description the agent is already filling in.
Edit either field. Summarize writes both again from the current changes.
Click Create. The toast reads "Changes synced to Github".
The branch is named after the canvas. The description ends with your email as the designer and a link back to the canvas.
A draft canvas
A canvas started from a blank codebase has no repository. Its GitHub button opens Create a GitHub project instead of the popover. Once the project exists, the canvas syncs like any other, see Start from a blank codebase.
If it does not work
The popover says "Nothing to sync yet. Make some changes in the codebase to get started.": the agent has not changed any code, or every change was undone. Sync to Github stays disabled until there is a change.
A toast starting with "Nothing to publish": the latest change reverted an earlier one, so the code equals your branch. Make the change you want and sync again.
A toast starting with "Changes moved on": the agent replied while the text was being written. Click Sync to Github once more.
"Couldn't sync to Github" or "Error opening Pull Request": the pull request was not created. Try again. If it fails twice, ask whoever connected the repository to check that Modeinspect still has access to it.
No Sync to Github anywhere: the canvas already has a pull request. The GitHub button shows it, see How changes reach your pull request.
