pull_requests

Set the scopes for a pull request

Changed on

Set the scopes for a pull request.

This addresses the scopes by pull request number alone, so the report cannot say which revision it was computed for, and the last one to arrive wins whatever head that was. Prefer PUT /repos/{owner}/{repository}/commits/{sha}/scopes, which names the revision.

A scope name may hold anything except a NUL byte or an unpaired UTF-16 surrogate, neither of which Postgres can store, and is limited to 1024 characters; a report carries at most 10000 of them. A report that breaks any of these is refused in full with a 422 and nothing is stored, so the pull request keeps whatever was reported for it last. A pull request number below 1, which GitHub never assigns, is refused the same way.

put/repos/{owner}/{repository}/pulls/{number}/scopes

Request

  • Base URL: https://api.mergify.com/v1
  • URL: https://api.mergify.com/v1/repos/{owner}/{repository}/pulls/{number}/scopes
  • Auth: HTTP bearer

Path parameters

numberinteger required

The pull request number

ownerstring required

The owner of the repository

repositorystring required

The name of the repository

Request body

scopesstring[] required
all_scopesboolean

Response

Successful Response

Changes