From 61637c6e3d9d6bfc803dd274181dc33fc9370efe Mon Sep 17 00:00:00 2001 From: Jean Dessane Date: Thu, 29 Feb 2024 09:39:20 +0100 Subject: [PATCH] feat: update state id --- action.yml | 4 ++++ src/main.ts | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index b19f420..f777906 100644 --- a/action.yml +++ b/action.yml @@ -26,6 +26,10 @@ inputs: default: 'RAY' required: false description: 'Ticket prefix (can be a regex)' + stateId: + default: '2dd3bad8-0d14-4708-84ff-a2903d36857a' + required: false + description: 'If you want to update your ticket state' diff --git a/src/main.ts b/src/main.ts index e8db73a..15f7ff9 100644 --- a/src/main.ts +++ b/src/main.ts @@ -10,6 +10,7 @@ export async function run(): Promise { const releaseLabelName: string = core.getInput('releaseLabel') const baseBranch = core.getInput('baseBranch') const maxPrLength = core.getInput('maxPrLength') + const stateId = core.getInput('stateId') const linearClient = new LinearClient({ apiKey }) @@ -84,7 +85,8 @@ export async function run(): Promise { console.log(`Updating ticket ${ref}`) const ticket = await linearClient.issue(ref) await ticket.update({ - labelIds: [releaseLabel.id, ...ticket.labelIds].filter(Boolean) + labelIds: [releaseLabel.id, ...ticket.labelIds].filter(Boolean), + stateId }) } catch (e) { console.error(e)