mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Stop PR in case of forbidden label (#8508)
* stop PR in case of forbidden label * sync PR * add tmp workflow * add tmp workflow * add tmp workflow * checkout repo
This commit is contained in:
14
scripts/github/update/check-issue-has-label.js
Executable file
14
scripts/github/update/check-issue-has-label.js
Executable file
@@ -0,0 +1,14 @@
|
||||
module.exports = async ({ github, context, checkLabels }) => {
|
||||
const { data: issue } = await github.rest.issues.get({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: context.issue.number,
|
||||
});
|
||||
const labels = issue.labels?.map(item => item.name);
|
||||
|
||||
if (checkLabels.some(i => labels.includes(i))) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user