Skip to content

Commit

Permalink
Renamed some things (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmingles committed Jul 18, 2024
1 parent ba73064 commit d29cdc9
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
run_id: ${{github.event.workflow_run.id }},
});
const matchArtifact = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "e2e-reports"
return artifact.name == "pr-comment"
})[0];
const download = await github.actions.downloadArtifact({
owner: context.repo.owner,
Expand All @@ -43,10 +43,10 @@ jobs:
archive_format: 'zip',
});
const fs = require('fs');
fs.writeFileSync('${{github.workspace}}/e2e-reports.zip', Buffer.from(download.data));
- run: unzip e2e-reports.zip
fs.writeFileSync('${{github.workspace}}/pr-comment.zip', Buffer.from(download.data));
- run: unzip pr-comment.zip
- name: 'Comment on PR'
description: Creates or updates a PR comment with the e2e test summary
description: Creates or updates a PR comment with generated summary
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -62,8 +62,8 @@ jobs:
// Append a marker to the summary content to identify the comment for later updates
const marker = '<!-- DH GH Action Comment -->';
const summaryContent = String(fs.readFileSync('./e2e-summary.html'));
const contentWithMarker = `${marker}\n${summaryContent}`;
const prComment = String(fs.readFileSync('./pr-comment.html'));
const contentWithMarker = `${marker}\n${prComment}`;
const existingComment = comments.data.find(comment => comment.body.startsWith(marker));
Expand Down

0 comments on commit d29cdc9

Please sign in to comment.