Skip to content

Commit

Permalink
chore: quote property keys and fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Planeshifter committed Dec 8, 2024
1 parent 5a95340 commit 4ec80d0
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 49 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/cleanup_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,19 @@ jobs:
script: |
const prNumber = context.payload.pull_request.number;
const { data: comments } = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
'owner': context.repo.owner,
'repo': context.repo.repo,
'issue_number': prNumber
});
const coverageComment = comments.find( comment => comment.body && comment.body.includes( '## Coverage Report' ) );
if ( coverageComment ) {
// Replace URLs with plain text in the coverage report comment body:
const updatedBody = coverageComment.body.replace( /<a href="[^"]+">([^<]+)<\/a>/g, '$1' );
await github.rest.issues.updateComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: coverageComment.id,
body: updatedBody,
'owner': context.repo.owner,
'repo': context.repo.repo,
'comment_id': coverageComment.id,
'body': updatedBody
});
} else {
console.log( 'No Coverage Report comment found.' );
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/run_tests_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,25 +226,25 @@ jobs:
github-token: ${{ secrets.CHATBOT_GITHUB_TOKEN }}
script: |
const { data: comments } = await github.rest.issues.listComments({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
'issue_number': context.issue.number,
'owner': context.repo.owner,
'repo': context.repo.repo,
});
const botComment = comments.find( comment => comment.user.login === 'stdlib-bot' && comment.body.includes( '## Coverage Report' ) );
if ( botComment ) {
await github.rest.issues.updateComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: botComment.id,
body: `${{ steps.create-report.outputs.report }}`,
'owner': context.repo.owner,
'repo': context.repo.repo,
'comment_id': botComment.id,
'body': `${{ steps.create-report.outputs.report }}`
});
} else {
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `${{ steps.create-report.outputs.report }}`,
'issue_number': context.issue.number,
'owner': context.repo.owner,
'repo': context.repo.repo,
'body': `${{ steps.create-report.outputs.report }}`
});
}
Expand All @@ -257,10 +257,10 @@ jobs:
github-token: ${{ secrets.CHATBOT_GITHUB_TOKEN }}
script: |
github.rest.repos.createCommitComment({
commit_sha: context.sha,
owner: context.repo.owner,
repo: context.repo.repo,
body: '${{ steps.create-report.outputs.report }}'
'commit_sha': context.sha,
'owner': context.repo.owner,
'repo': context.repo.repo,
'body': '${{ steps.create-report.outputs.report }}'
})
# Checkout coverage repository:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
[
"name",
"version",
"description",
"license",
"licenses",
"author",
"maintainers",
"contributors",
"name",
"version",
"description",
"license",
"licenses",
"author",
"maintainers",
"contributors",
"funding",
"bin",
"main",
"exports",
"browser",
"unpkg",
"gypfile",
"directories",
"types",
"scripts",
"homepage",
"repository",
"repositories",
"bugs",
"dependencies",
"bin",
"main",
"exports",
"browser",
"unpkg",
"gypfile",
"directories",
"types",
"scripts",
"homepage",
"repository",
"repositories",
"bugs",
"dependencies",
"optionalDependencies",
"devDependencies",
"engines",
"os",
"keywords",
"__stdlib__"
"devDependencies",
"engines",
"os",
"keywords",
"__stdlib__"
]

0 comments on commit 4ec80d0

Please sign in to comment.