Skip to content

Support for Quick Actions responses when making a Merge Request Note #1273

@spartan-jack

Description

@spartan-jack

In the NotesAPI, when calling createMergeRequestNote (https://docs.gitlab.com/api/notes/#create-new-merge-request-note), if you use entirely Quick Actions, no note is created. This also means the response body doesn't match the Note class. Instead, it has the following fields:

  • commands_changes: A map showing all the changed fields in the MR
  • summary: A string that is a summary of all the changes made, and errors if there were any

For example:

curl -vvv --request POST \
  --header "PRIVATE-TOKEN: glpat-<REDACTED>" \
  --header "Content-Type: application/json" \
  --data '{"body": "/draft\n/assign_reviewer @GitLabDuo\n/label ~\"my-test\""}' \
  "https://gitlab.com/api/v4/projects/9372/merge_requests/22/notes"
{
  "commands_changes": {
    "add_label_ids": [
      432
    ],
    "wip_event": "draft"
  },
  "summary": [
    "No change to this merge request's draft status. Your account doesn't have GitLab Duo access. Please contact your system administrator for access. Added ~\"my-test\" label."
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions