apicheats.dev Cheat sheet Raw .md
PATCH

Try PATCH /repos/{owner}/{repo}/secret-scanning/custom-patterns/{pattern_id} — GitHub API

GitHub playground

Update a repository custom pattern

Credentials

Kept in this tab only. Requests go through apicheats.dev's same-origin proxy straight to api.github.com; the proxy stores and logs nothing about them.

Headers

Path

Body application/json

6 body fields
  • pattern · optional · string — The updated regular expression of the custom pattern.
  • start_delimiter · optional · string — The updated start delimiter regex for the custom pattern.
  • end_delimiter · optional · string — The updated end delimiter regex for the custom pattern.
  • must_match · optional · string[] — Updated list of regexes that the secret must match.
  • must_not_match · optional · string[] — Updated list of regexes that the secret must not match.
  • custom_pattern_version · required · string — The version of the entity. This is used to confirm you're updating the current version of the entity and mitigate unintentionally overriding someone else's update.