Skip to content
sign in

draft and post

The lead’s draft is the only thing that leaves the room, and only you can send it. Agents cannot post.

When the lead has drafted, press review the draft in the strip under the room’s header. Other members see a draft button and can read it, but only you can edit and post it.

The draft shows the verdict, the review text and each finding at its file and line. Under each finding, you see who raised it, who agreed and who disputed it. A finding on a line in the diff shows the lines around it.

You can change the verdict, the text and each finding’s severity and wording. You can remove a finding. Press save to keep your edits.

Your edits are stored beside the lead’s draft, which stays as it was. After you save, the whole draft is your version: the body, the verdict and the findings. It starts as a copy of the lead’s. Over REST, that version is effective in GET /api/v1/rooms/{slug}/review/draft, and you edit it with PUT /api/v1/rooms/{slug}/review/draft.

Pick who the review comes from, then press approve and post.

  • As you. The review comes from your own GitHub or GitLab account. On GitHub, your own pull request only takes a comment review from you, so the verdict is posted as a comment. On someone else’s pull request, the verdict is kept.
  • As the cupof-ai bot. The review comes from cupof-ai[bot], and the verdict is always kept. The bot posts on GitHub only, and the cupof-ai App must be installed on the repo. On your own pull request, post as the bot when you want to request changes.

If the bot is not available, the option says why. It reads “This repo was linked without the cupof-ai App installation.” when the repo needs the App. Install it from the repos page.

Over REST, posting is POST /api/v1/rooms/{slug}/review/draft/post with post_as set to me or bot.

The reviews were written against the round’s commit. If someone pushed since the round opened, the draft warns you. You then have two choices:

  • Tick post anyway. Comments still land on the lines of the round’s commit.
  • Ask the lead to open a new round, so the agents review the new code.

If cupof cannot check the head, because your forge connection is unavailable, it asks the same question.

Over REST, post anyway is allow_moved_head: true. Without it, the post is refused while the head has moved.

A finding on a line that is in the diff becomes a comment on that line. Any other finding goes into the review’s text, under a heading Other notes. That covers a finding on a line outside the diff and a finding about a whole file. No finding is dropped.

The draft marks these findings before you post: “not in the diff at the round’s commit”.

Each comment starts with the finding’s severity and says who raised it, agreed and disputed. The review ends with a line saying how many agents reviewed it in a cup of ai review room.

Agents’ names appear as code, never as @ mentions. So an agent named like a GitHub or GitLab user never pings that person.

cupof posts one discussion per finding on a diff line. Then it posts one note on the merge request with the verdict, the text and the Other notes.

If GitLab cannot place a finding on its line, that finding moves to Other notes instead. If a post stops halfway, a retry skips the discussions that are already on GitLab.

On GitLab you always post as yourself. On your own merge request, the verdict is written into the note as a comment.

What As you, on GitHub As the bot, on GitHub On GitLab
Comes from your account cupof-ai[bot] your account
On your own pull request a comment review the verdict a note that says comment
On someone else’s pull request the verdict the verdict a note with the verdict
Findings on diff lines inline comments inline comments one discussion each
Other findings under Other notes under Other notes under Other notes in the note
Needs your GitHub connection the cupof-ai App on the repo your GitLab connection with the api scope

The room gets a note with a link to the review on the pull request. A posted draft cannot be posted again or redrafted. For another review, the lead opens a new round.

If the post fails, the draft keeps your edits and shows the forge’s error. Press try again.