# Code in the devlo app

> Open a chat on a GitHub repository in the devlo app to ask about the code, change and test it, see a live preview, and open a pull request.

Work on a repository you already have on GitHub from a chat in the devlo app: ask about the code, have devlo change and test it, watch a live preview, then open a pull request. The app lists these chats as repository chats; devlo.ai calls the feature the Code Editor.

## Start a repository chat

On **Home**, select **New** under **Repository chats** and pick a repository. You need a seat in the repository’s organization and either write access to the repository or the owner or admin role there. If you haven’t yet, [connect GitHub](/get-started/connect-github/).

## What you can do

On every plan, devlo can run commands and tests, show a live preview when it can run the repository’s frontend, and check UI changes in a browser. The preview link is public: anyone with it can open the running app.

You can also edit files yourself in the **Code** tab, on every plan. Stop, edit, and restore work as they do in projects; see [Chat controls](/build/chat/). Repository chats don’t publish a site; to build and publish a new app, [start a project](/build/#start-a-project).

## Open a pull request

After each turn, devlo pushes your changes to the chat’s own branch. To be sure devlo can’t push to an important branch, protect it on GitHub.

Ask for a pull request in your own words, or select **Publish**, then **Add to chat**, and send the request it adds. devlo opens the pull request and replies with its link. For UI changes, the pull request includes the preview link, so anyone who can see the pull request can open the app.

To update the pull request, keep chatting. New changes go to the same branch.

Caution

Restoring a checkpoint, or rolling back code when you edit your last message, force-pushes the chat branch back to that point. An open pull request from the branch changes too.

## Plans and credits

A repository chat uses the plan and credits of the repository’s organization. If that plan is Free, you can own 2 chats in total, projects included. Repository chats you own also count toward your personal plan’s project limit. See [Plans and credits](/account/plans/).

## Related

* [Chat controls](/build/chat/)
* [Write tasks and instructions](/coding/writing-tasks/)
