mirror of
https://github.com/actions/add-to-project.git
synced 2025-12-12 21:17:11 +00:00
Add new option for excluding issues with certain labels
This commit is contained in:
@@ -50,11 +50,16 @@ export async function addToProject(): Promise<void> {
|
|||||||
core.info(`Skipping issue ${issue?.number} because it doesn't match all the labels: ${labeled.join(', ')}`)
|
core.info(`Skipping issue ${issue?.number} because it doesn't match all the labels: ${labeled.join(', ')}`)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
} else {
|
} else if (labelOperator === 'or') {
|
||||||
if (labeled.length > 0 && !issueLabels.some(l => labeled.includes(l))) {
|
if (labeled.length > 0 && !issueLabels.some(l => labeled.includes(l))) {
|
||||||
core.info(`Skipping issue ${issue?.number} because it does not have one of the labels: ${labeled.join(', ')}`)
|
core.info(`Skipping issue ${issue?.number} because it does not have one of the labels: ${labeled.join(', ')}`)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
} else if (labelOperator === 'not') {
|
||||||
|
if (labeled.length > 0 && issueLabels.some(l => labeled.includes(l))) {
|
||||||
|
core.info(`Skipping issue $(issue?.number} because it contains one of the labels: $(labeled.join(', ')}`)
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
core.debug(`Project URL: ${projectUrl}`)
|
core.debug(`Project URL: ${projectUrl}`)
|
||||||
|
|||||||
Reference in New Issue
Block a user