parent
d50cb17256
commit
e8c6c537de
1 changed files with 5 additions and 6 deletions
|
@ -26,7 +26,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
const commentId = context.payload.comment.id;
|
const commentId = context.payload.comment.id;
|
||||||
await github.issues.deleteComment({
|
await github.rest.issues.deleteComment({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
comment_id: commentId
|
comment_id: commentId
|
||||||
|
@ -37,9 +37,8 @@ jobs:
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@v7
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
const userId = context.payload.comment.user.id;
|
const username = context.payload.comment.user.login;
|
||||||
await github.users.block({
|
await github.rest.orgs.blockUser({
|
||||||
owner: context.repo.owner,
|
org: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
username: username
|
||||||
user_id: userId
|
|
||||||
});
|
});
|
Loading…
Add table
Add a link
Reference in a new issue