Skip to content

Commit e12f061

Browse files
authored
github-action: add supported GitHub commands (#1549)
1 parent 2dd7665 commit e12f061

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: github-commands-comment
3+
4+
on:
5+
pull_request_target:
6+
types:
7+
- opened
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
comment:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
issues: write
17+
pull-requests: write
18+
steps:
19+
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
20+
with:
21+
script: |
22+
const body = `
23+
### :robot: GitHub comments
24+
25+
<details><summary>Expand to view the GitHub comments</summary>
26+
<p>
27+
28+
Just comment with:
29+
- `run` `docs-build` : Re-trigger the docs validation. (use unformatted text in the comment!)
30+
</p>
31+
</details>
32+
`.replace(/ +/g, '')
33+
github.rest.issues.createComment({
34+
issue_number: context.issue.number,
35+
owner: context.repo.owner,
36+
repo: context.repo.repo,
37+
body: body
38+
})

0 commit comments

Comments
 (0)