"Traditional" Compliance Events #5
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Code Coverage Comment | |
on: | |
pull_request: | |
types: [opened, reopened] | |
jobs: | |
comment: | |
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 + ')' | |
}) |