Skip to content

Commit c38289e

Browse files
authored
Replace hidden tag with html comment (#1566)
* Replace hidden tag with html comment * Replace hidden tag with html comment * Replace hidden tag with html comment * Replace hidden tag with html comment * Replace hidden tag with html comment
1 parent 397a125 commit c38289e

File tree

7 files changed

+34
-43
lines changed

7 files changed

+34
-43
lines changed

.github/workflows/branch.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Branch
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
- release/**
7+
types: [opened, synchronize, reopened]
8+
push:
9+
branches:
10+
- main
11+
- release/v*
12+
paths-ignore:
13+
- '.github/**'
14+
- 'docs/**'
15+
- 'examples/**'
16+
- 'test/**'
17+
- 'README.md'
18+
19+
permissions:
20+
contents: write
21+
actions: write
22+
23+
jobs:
24+
github-action:
25+
uses: cloudposse/.github/.github/workflows/shared-github-action.yml@main
26+
secrets: inherit

.github/workflows/release-branch.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/workflows/release-published.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
1-
---
2-
name: release
1+
name: Release
32
on:
43
release:
5-
types:
6-
- published
4+
types: [published]
75

86
permissions:
97
id-token: write
108
contents: write
119
pull-requests: write
1210

1311
jobs:
14-
terraform-module:
12+
github-action:
1513
uses: cloudposse/.github/.github/workflows/shared-release-branches.yml@main
1614
secrets: inherit

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ $RECYCLE.BIN/
1515

1616
# Code coverage reports
1717
/coverage
18-
.build-harness
18+
.build-harness
19+
build-harness

build-harness

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/action.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,18 +218,18 @@ const postSummaries = async (table, components) => {
218218
const postComment = async (octokit, context, table) => {
219219
const commentId = "github-action-atmos-terraform-drift-detection-comment"
220220
// Suffix comment with hidden value to check for updating later.
221-
const commentIdSuffix = `\n\n\n<hidden purpose="github-action-atmos-terraform-drift-detection-comment" value="${commentId}"></hidden>`;
221+
const commentIdSuffix = `<!-- purpose="github-action-atmos-terraform-drift-detection-comment" value="${commentId}" -->`;
222222

223223
const existingCommentId = await octokit.rest.issues.listComments({
224224
...context.repo,
225225
issue_number: context.payload.pull_request.number,
226226
}).then( result => {
227227
return result.data.filter(item => {
228-
return item.body !== ""
228+
return item.body.includes(commentIdSuffix)
229229
}).map(item => { return item.id }).pop()
230230
})
231231

232-
const commentBody = table.join("\n") + commentIdSuffix;
232+
const commentBody = table.join("\n") + `\n\n\n` + commentIdSuffix;
233233
// If comment already exists, get the comment ID.
234234
if (existingCommentId) {
235235
console.log("Update comment")

0 commit comments

Comments
 (0)