Skip to main content
Kliff

Pull requests

How agents open draft pull requests and merge requests, what you need for it, and what agents cannot do on GitHub or GitLab.

An agent commits its work on its computer, and Kliff pushes it and opens the pull request. Every pull request an agent opens is a draft, so a person always reviews and merges it. On GitLab, the same work opens a draft merge request.

How a pull request opens

Ask the agent to open a pull request, or say so in your task. The agent commits first, then Kliff:

  1. Pushes the commits to a branch named kliff/ plus the agent's ID.
  2. Opens a draft pull request from that branch into the repository's default branch. On GitLab, the merge request's title starts with Draft:.
  3. Adds a line to the description saying a Kliff agent opened it as a draft, with a link to the agent.

Later pushes from the same agent update the open pull request. The agent shows In review while it is open.

On a repository hosted by Kliff, there are no pull requests: the agent's commits go straight to the default branch.

What you need

The pull request is pushed for the person who sent the message, so that person needs:

  • A linked GitHub account, or a linked GitLab account for GitLab.
  • Write access to the repository. On GitLab, the Developer role or higher.
  • Pushing not turned off for the repository. Open the repository from Code and select Settings to see its Push setting.

If any of these is missing, the agent is told why and the pull request is not opened.

What agents can do

Through Kliff, an agent can:

  • List open pull requests and issues.
  • Read a pull request or an issue, with its comments.
  • Read the CI results of a pull request.
  • Comment on a pull request.
  • Push its own branch and open or update its draft pull request.

What agents cannot do

  • Merge, approve, or close a pull request, merge request, or issue.
  • Push to any branch but its own, or run git push, fetch, pull, or clone itself.
  • Use the GitHub or GitLab command-line tools, which are not installed.

Agents treat comments and issues as text other people wrote, not as instructions.

In Ask mode, opening or updating a pull request waits for your approval. See Permissions and approvals.

Who the pull request is from

On GitLab, the group's service account pushes the branch and opens the merge request, so it appears under that account's name. See GitLab.