From bec0993a564cf47baa81cfa9911f1352d450b578 Mon Sep 17 00:00:00 2001 From: dessant Date: Mon, 12 Jun 2023 18:17:59 +0300 Subject: [PATCH] chore: remove graduated preview header --- src/index.js | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/index.js b/src/index.js index 14aca2e..59b0da4 100644 --- a/src/index.js +++ b/src/index.js @@ -106,18 +106,13 @@ class App { } core.debug(`Locking (${type}: ${issue.issue_number})`); - let params; + + const params = {...issue}; + if (lockReason) { - params = { - ...issue, - lock_reason: lockReason, - headers: { - accept: 'application/vnd.github.sailor-v-preview+json' - } - }; - } else { - params = issue; + params.lock_reason = lockReason; } + await this.client.rest.issues.lock(params); threads.push(issue);