Skip to content

Commit 288bae9

Browse files
committed
#2378: ci: use sticky comment
1 parent 55f58ca commit 288bae9

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

.github/workflows/run-clang-format.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,24 @@ jobs:
2121
- uses: actions/github-script@v7
2222
with:
2323
script: |
24-
console.log(process.env)
24+
let commentId = -1
25+
26+
const response = await github.paginate(
27+
github.rest.issues.listComments, {
28+
owner: context.repo.owner,
29+
repo: context.repo.repo,
30+
issue_number: context.issue.number
31+
},
32+
(response) => response.data
33+
)
34+
console.log(response)
35+
36+
console.log(commentId)
37+
2538
const { CLANG_FORMAT_DIFF } = process.env
26-
github.rest.issues.createComment({
27-
issue_number: context.issue.number,
39+
await github.rest.issues.createComment({
2840
owner: context.repo.owner,
2941
repo: context.repo.repo,
42+
issue_number: context.issue.number,
3043
body: '```diff\n' + CLANG_FORMAT_DIFF + '\n```'
3144
})

0 commit comments

Comments
 (0)