mirror of
https://github.com/SpotX-Official/SpotX.git
synced 2026-06-14 03:16:33 +10:00
Update auto-closes workflow to check actor login
This commit is contained in:
@@ -17,12 +17,13 @@ jobs:
|
|||||||
script: |
|
script: |
|
||||||
const issue = context.payload.issue;
|
const issue = context.payload.issue;
|
||||||
const title = issue.title.toLowerCase();
|
const title = issue.title.toLowerCase();
|
||||||
const authorAssociation = issue.author_association;
|
const actor = context.payload.sender.login;
|
||||||
|
|
||||||
const privilegedRoles = ['OWNER', 'MEMBER', 'COLLABORATOR'];
|
// Проверяем, кто выполнил действие (не создателя issue, а того кто сейчас действует)
|
||||||
|
const privilegedUsers = ['amd64fox'];
|
||||||
|
|
||||||
if (privilegedRoles.includes(authorAssociation)) {
|
if (privilegedUsers.includes(actor)) {
|
||||||
console.log('Issue #' + issue.number + ' action performed by ' + authorAssociation + ' - will not auto-close');
|
console.log('Issue #' + issue.number + ' action performed by @' + actor + ' - will not auto-close');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user