GitHub repositories: let N open pull requests
Connect GitHub, choose the repos N may work on, and ask N in your own DM for a change. N opens a branch and a pull request and never merges. Beta.
Browse documentation
What repo work is
Repo work lets Agent N make a change in your code. You ask N in your own DM, N works on a copy of the repo, and the result arrives as a pull request for your team to review. Repo work is Beta.
It is coming to workspaces in stages. Until it is switched on, the Repositories page says "Repo work isn't switched on for Nagent yet."
Repo work needs the Business plan or above. To see the page you need to be able to see tools; to connect GitHub, choose repos or disconnect, you need to be able to change tools.
Connect GitHub
- Open Integrations and choose Repositories (Beta).
- Press Connect GitHub and install the app on your GitHub account or organisation. If it is already installed on GitHub, press Already installed on GitHub? Connect it instead.
- Back on the page, the account appears with the repos shared with Nagent on GitHub.
Only the GitHub account owner or an organisation admin can connect it. A GitHub account can be connected to one Nagent workspace at a time.
Choose the repos N may work on
- Under the connected account, tick the repos N may work on. Each shows whether it is private or public, and Allowed or Not allowed.
- Press Save.
You can allow up to 200 repos. N can only open pull requests on repos you allow here. To change which repos GitHub shares at all, press Change repo access on GitHub.
Disconnect stops agents working on that account's repos. If GitHub pauses the installation, the account shows as suspended and no repo work can start from it.
Ask N for a change
Repo work is asked for in your own DM with N, not in a team room. Say which allowed repo and what should change, and, if you want, the branch to start from and the command that runs the tests. N:
- reads the repo and makes the change on a copy,
- pushes it to a new branch whose name starts with
nagent/, - opens a pull request against the branch it started from (the repo's default unless you named one), and says in it who asked for the change,
- reports progress in your DM, and can be asked for the status or to cancel.
If you want the pull request against a branch other than the default, say so plainly, for example "open a PR against staging". When N starts, it tells you the branch the run uses, and the run card shows it as Base. If that is not the branch you meant, cancel the run and ask again.
N never merges, approves or force-pushes. Review and merge the pull request yourself. If N pushed fixes after your checks failed, look at those changes too before you merge.
A workspace can have 2 repo runs going at once and start 10 a day. A run can work for up to 3 hours before its pull request opens, and N stops any run still going after 14 hours.
Repo work is charged in credits. While a run works, up to 16,000 credits are held for it; when it finishes you are charged what it used and the rest is released. The run card shows what it has used so far.
Approved site fixes as pull requests (Beta)
DRIS can turn approved SEO fixes into pull requests on the repo that builds the page. A person starts them after reading a confirm; nothing starts on its own at any autonomy level.
Link a site to its repo. On the Repositories page, under Sites built from these repos, add the site's host, the allowed repo that builds it, an optional base branch, and a test command (at most 200 characters). A site that is not linked, or has no test command, gets no pull request. A link can be switched off without removing it.
Select approved fixes. On DRIS's SEO proposals page, each approved fix shows where it goes: a pull request on a named repo, edited in Nagent, served to your site, an approval request, or the developer handoff. Select any mix of approved fixes and press Open pull request. You need the permission to run fixes.
Read the split. Nagent splits the selection into one or more pull requests by repo, base branch, the kind of page and the kind of fix, with at most 20 fixes in each. The confirm shows every pull request (its fixes, repo, base, test command and the credit hold) and every fix left out with the reason, such as a page that reads its copy from the Nagent database or a page whose files Nagent could not tell. The split is the same every time for the same selection.
Confirm. Each pull request starts as you. Up to 16,000 credits are held for each one while it runs, and you pay what it uses. What the workspace's limits allow starts at once; the rest waits in a queue and starts on its own as slots free, within five minutes or so. A waiting fix says why it waits, and anyone who can run fixes can take it out of the queue with Take out of the queue.
Follow it. Each fix in a pull request shows how it stands, with a link to the pull request on GitHub. A fix stays approved while its pull request is open and turns executed only when it merges. If the run left a fix out, the fix stays approved with the reason. If a pull request is closed without merging, the fixes stay approved and can be selected again; if it is reopened, they show it as open again. Review and merge the pull request yourself, as with any repo run.