diff --git a/plugins/scaffolder-backend/src/scaffolder/stages/publish/helpers.ts b/plugins/scaffolder-backend/src/scaffolder/stages/publish/helpers.ts index dcf444fa6c..9d5effa8b2 100644 --- a/plugins/scaffolder-backend/src/scaffolder/stages/publish/helpers.ts +++ b/plugins/scaffolder-backend/src/scaffolder/stages/publish/helpers.ts @@ -89,16 +89,15 @@ export const enableBranchProtectionOnDefaultRepoBranch = async ({ try { await client.repos.updateBranchProtection({ - headers: { - Accept: - /** - * 👇 we need this header because allowing a custom - * reviewer count on branch protection is a preview - * feature. - * - * More here: https://docs.github.com/en/rest/overview/api-previews#require-multiple-approving-reviews - */ - 'application/vnd.github.luke-cage-preview+json', + mediaType: { + /** + * 👇 we need this preview because allowing a custom + * reviewer count on branch protection is a preview + * feature. + * + * More here: https://docs.github.com/en/rest/overview/api-previews#require-multiple-approving-reviews + */ + previews: ['luke-cage-preview'], }, owner, repo: repoName,