Unverified Commit 28a5eaa8 authored by Sam Ko's avatar Sam Ko Committed by GitHub

chore(github): update sync label logic (#69072)

## Why?

When the top 15 issues workflow runs, we should automatically sync an
issue (sync with Linear) with the label `Turbopack` with `linear:
turbopack` instead of just all with `linear: next`.
parent 3dce2eed
...@@ -55,11 +55,18 @@ async function run() { ...@@ -55,11 +55,18 @@ async function run() {
if (data.items.length > 0) { if (data.items.length > 0) {
data.items.forEach(async (item) => { data.items.forEach(async (item) => {
const labelType = item.labels.some(
(label) => label.name === 'Turbopack'
)
? 'turbopack'
: 'next'
const syncLabel = `linear: ${labelType}`
await octoClient.rest.issues.addLabels({ await octoClient.rest.issues.addLabels({
owner, owner,
repo, repo,
issue_number: item.number, issue_number: item.number,
labels: ['linear: next'], labels: [syncLabel],
}) })
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment