Skip to content

Commit

Permalink
feat: update state id
Browse files Browse the repository at this point in the history
  • Loading branch information
jean9696 committed Feb 29, 2024
1 parent 9ec6a65 commit 61637c6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'



Expand Down
4 changes: 3 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export async function run(): Promise<void> {
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 })

Expand Down Expand Up @@ -84,7 +85,8 @@ export async function run(): Promise<void> {
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)
Expand Down

0 comments on commit 61637c6

Please sign in to comment.