Skip to content

Commit fbcb904

Browse files
committed
feat(actions): add maintain-one-comment
1 parent da41ad1 commit fbcb904

10 files changed

Lines changed: 19778 additions & 3 deletions

File tree

.github/workflows/reusable-pr-preview.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
echo the preview URL is $DEPLOY_DOMAIN
4242
echo "url=$DEPLOY_DOMAIN" >> $GITHUB_OUTPUT
4343
- name: update status comment
44-
uses: actions-cool/maintain-one-comment@v3
44+
uses: TDesignOteam/workflows/actions/maintain-one-comment@main
4545
with:
4646
token: ${{ secrets.GITHUB_TOKEN }}
4747
body: |
@@ -56,7 +56,7 @@ jobs:
5656
5757
- name: The job failed
5858
if: ${{ failure() }}
59-
uses: actions-cool/maintain-one-comment@v3
59+
uses: TDesignOteam/workflows/actions/maintain-one-comment@main
6060
with:
6161
token: ${{ secrets.GITHUB_TOKEN }}
6262
body: |
@@ -81,7 +81,7 @@ jobs:
8181
id: pr
8282
run: echo "id=$(<pr-id.txt)" >> $GITHUB_OUTPUT
8383
- name: The job failed
84-
uses: actions-cool/maintain-one-comment@v3
84+
uses: TDesignOteam/workflows/actions/maintain-one-comment@main
8585
with:
8686
token: ${{ secrets.GITHUB_TOKEN }}
8787
body: |

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ TDesign 共享的 GitHub Actions 工作流。
1717
| `check-email` | 检查 commit 邮箱是否符合规范(不能是 @tencent.com) |
1818
| `close-release-issue` | 合并 release 分支时关闭带有特定标签的 issues |
1919
| `cnb-delete-branch` | 删除 CNB 分支前先关闭关联的 PR |
20+
| `maintain-one-comment` | 为 issue/PR 维护一条唯一评论,重复执行时更新而不是新增 |
2021
| `setup-flutter` | 设置 Flutter 环境 |
2122
| `setup-surge` | 部署到 Surge |
2223
| `upgrade-deps` | 升级依赖版本 |
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Maintain One Comment
2+
description: Create or update one issue or pull request comment identified by a marker
3+
4+
inputs:
5+
token:
6+
description: GitHub token
7+
required: true
8+
number:
9+
description: Issue or pull request number
10+
required: true
11+
body:
12+
description: Comment body
13+
required: true
14+
body-include:
15+
description: Marker used to find the existing comment
16+
required: false
17+
repo:
18+
description: Repository name
19+
required: false
20+
owner:
21+
description: Repository owner
22+
required: false
23+
24+
runs:
25+
using: node24
26+
main: ../../packages/maintain-one-comment/dist/index.mjs

0 commit comments

Comments
 (0)