Skip to content

Commit adbda84

Browse files
committed
Check issue cleaned
1 parent c06fe21 commit adbda84

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/action.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -295,9 +295,9 @@ const postDriftDetectionSummary = async (context, maxOpenedIssues, componentsToI
295295
for (let slug of Object.keys(componentsToNewlyCreatedIssues)) {
296296
const issueNumber = componentsToNewlyCreatedIssues[slug];
297297

298-
if (driftingComponents.hasOwnProperty(slug)) {
298+
if (driftingComponent.includes(slug)) {
299299
table.push( `| [${slug}](https://github.com/${orgName}/${repo}/actions/runs/${runId}#user-content-result-${slug}) | ![drifted](https://shields.io/badge/DRIFTED-important?style=for-the-badge "Drifted") | New drift detected. Created new issue [#${issueNumber}](https://github.com/${orgName}/${repo}/issues/${issueNumber}) |`);
300-
} else if (erroredComponents.hasOwnProperty(slug)) {
300+
} else if (erroredComponents.includes(slug)) {
301301
table.push( `| [${slug}](https://github.com/${orgName}/${repo}/actions/runs/${runId}#user-content-result-${slug}) | ![failed](https://shields.io/badge/FAILED-ff0000?style=for-the-badge "Failed") | Failure detected. Created new issue [#${issueNumber}](https://github.com/${orgName}/${repo}/issues/${issueNumber}) |`);
302302
}
303303
}
@@ -306,9 +306,9 @@ const postDriftDetectionSummary = async (context, maxOpenedIssues, componentsToI
306306
const slug = componentsCandidatesToCreateIssue[i];
307307

308308
if (!componentsToNewlyCreatedIssues.hasOwnProperty(slug)) {
309-
if (driftingComponents.hasOwnProperty(slug)) {
309+
if (driftingComponents.includes(slug)) {
310310
table.push( `| [${slug}](https://github.com/${orgName}/${repo}/actions/runs/${runId}#user-content-result-${slug}) | ![drifted](https://shields.io/badge/DRIFTED-important?style=for-the-badge "Drifted") | New drift detected. Issue was not created because maximum number of created issues ${maxOpenedIssues} reached |`);
311-
} else if (erroredComponents.hasOwnProperty(slug)) {
311+
} else if (erroredComponents.includes(slug)) {
312312
table.push( `| [${slug}](https://github.com/${orgName}/${repo}/actions/runs/${runId}#user-content-result-${slug}) | ![failed](https://shields.io/badge/FAILED-ff0000?style=for-the-badge "Failed") | Failure detected. Issue was not created because maximum number of created issues ${maxOpenedIssues} reached |`);
313313
}
314314
}
@@ -345,7 +345,7 @@ const postDriftDetectionSummary = async (context, maxOpenedIssues, componentsToI
345345
table.push( `| [${slug}](https://github.com/${orgName}/${repo}/actions/runs/${runId}#user-content-result-${slug}) | ![failed](https://shields.io/badge/FAILED-ff0000?style=for-the-badge "Failed") | Failure detected. Issue already exists [#${issueNumber}](https://github.com/${orgName}/${repo}/issues/${issueNumber}) |`);
346346
}
347347
}
348-
348+
349349
if (table.length > 1) {
350350
await core.summary
351351
.addRaw('# Drift Detection Summary', true)

0 commit comments

Comments
 (0)