Skip to content

More toolkit utilities #9

More toolkit utilities

More toolkit utilities #9

name: Code Coverage Comment
on:
pull_request:
types: [opened, reopened]
jobs:
comment:
name: Add PR Code Coverage Report
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v7
with:
script: |
const branchName = '${{ github.head_ref }}'
const repo = 'JustinKuli/governance-policy-nucleus'
const badgePath = 'https://github.com/' + repo + '/wiki/' + branchName + '/coverage.svg'
const reportPath = 'https://raw.githack.com/wiki/' + repo + '/' + branchName + '/coverage.html'
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Code Coverage Report for this branch (might be slow to update): [![Go Coverage](' + badgePath + ')](' + reportPath + ')'
})