Skip to content

Commit

Permalink
core: issue cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
romgrk committed Sep 17, 2023
1 parent 7010922 commit 2604b2b
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/issue-cleanup.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Cleanup issue comment

on:
issues:
types:
- opened

permissions: {}

jobs:
issue_cleanup:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6
with:
script: |
const comments = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
});
console.log(comments);
if (comments.length > 0) {
const comment = comments[0];
console.log(comment);
// const result = await octokit.rest.issues.updateComment({
// owner: context.repo.owner,
// repo: context.repo.repo,
// comment_id: comment.id,
// body,
// });
console.log(result)
}

0 comments on commit 2604b2b

Please sign in to comment.