File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed
Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -190,7 +190,28 @@ jobs:
190190 with :
191191 github-token : ${{ secrets.GITHUB_TOKEN }}
192192 script : |
193- github.rest.issues.createComment({
193+ // Delete previous migration info comments
194+ const comments = await github.rest.issues.listComments({
195+ issue_number: context.issue.number,
196+ owner: context.repo.owner,
197+ repo: context.repo.repo,
198+ per_page: 100
199+ });
200+
201+ const MIGRATION_HEADER = '## Approve Database Migration';
202+
203+ for (const comment of comments.data) {
204+ if (comment.body && comment.body.startsWith(MIGRATION_HEADER)) {
205+ await github.rest.issues.deleteComment({
206+ owner: context.repo.owner,
207+ repo: context.repo.repo,
208+ comment_id: comment.id
209+ });
210+ }
211+ }
212+
213+ // Add the new migration info comment
214+ await github.rest.issues.createComment({
194215 issue_number: context.issue.number,
195216 owner: context.repo.owner,
196217 repo: context.repo.repo,
You can’t perform that action at this time.
0 commit comments