---
title: "👤 Set the release matching rule for a list of repositories. Only for account admins. Release settings are rules by which to mark releases in GitHub repositories."
method: PUT
path: "/settings/release_match"
tags: ["settings", "default"]
---

# 👤 Set the release matching rule for a list of repositories. Only for account admins. Release settings are rules by which to mark releases in GitHub repositories.

`PUT /settings/release_match`

## Request

- Base URL: `{{ server_url }}/v1`
- URL: `{{ server_url }}/v1/settings/release_match`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/athenian/apis/title/docs/settings/release_match/put.ts> (a function with typed inputs; its response is checked against the schema)

## Request body

- ReleaseMatchRequest: Release matching rule update.
  - `account` integer, required: Account ID.
  - `repositories` RepositoryID[], required: Set of repositories. An empty list raises a bad response 400. Duplicates are automatically ignored.
  - `branches` string: Regular expression to match branch names. The match starts from the beginning of the string. Special value `{{ "{{default}}" }}` matches to the default branch name - usually, `main` or `master`. Reference: https://www.postgresql.org/docs/current/functions-matching.html#FUNCTIONS-SIMILARTO-REGEXP
  - `tags` string: Regular expression to match tag names. The match starts from the beginning of the string. Reference: https://www.postgresql.org/docs/current/functions-matching.html#FUNCTIONS-SIMILARTO-REGEXP
  - `events` string: Regular expression to match event releases (submitted by the user via `/events/releases`). The match starts from the beginning of the string. Reference: https://www.postgresql.org/docs/current/functions-matching.html#FUNCTIONS-SIMILARTO-REGEXP
  - `match` 'branch' | 'event' | 'tag' | 'tag_or_branch', required: Release workflow choice: how we should detect releases. * `branch`: merges to certain branches are considered releases and nothing else. * `event`: releases are manually registered with `POST /events/releases`. * `tag`: tags with certain name patterns are considered releases and nothing else. * `tag_or_branch`: follow "tag"; if the repository does not have tags, fallback to "branch".

## Response `200`

List the repositories affected.

- RepositoryID[]: Set of repositories. An empty list raises a bad response 400. Duplicates are automatically ignored.

## Other responses

- `400`: Request is invalid.
- `403`: The user is not an admin of this account.
- `404`: The user or the account was not found.
- `422`: The installation has not finished yet.

---

[API](https://skmtc.dev/athenian/apis/title.md) - [All operations](https://skmtc.dev/athenian/apis/title/llms.txt) - [OpenAPI document](https://skmtc.dev/athenian/apis/title/revisions/110c9f7cffdd?raw)
