Comment on PR with framework coverage changes #22414
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: Comment on PR with framework coverage changes | |
on: | |
workflow_run: | |
workflows: ["Check framework coverage changes"] | |
types: | |
- completed | |
permissions: | |
contents: read | |
pull-requests: write | |
jobs: | |
check: | |
name: Check framework coverage differences and comment | |
runs-on: ubuntu-latest | |
if: > | |
${{ github.event.workflow_run.event == 'pull_request' && | |
github.event.workflow_run.conclusion == 'success' }} | |
steps: | |
- name: Dump GitHub context | |
env: | |
GITHUB_CONTEXT: ${{ toJSON(github.event) }} | |
run: echo "$GITHUB_CONTEXT" | |
- name: Clone self (github/codeql) | |
uses: actions/checkout@v4 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Check coverage difference file and comment | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
RUN_ID: ${{ github.event.workflow_run.id }} | |
run: | | |
python misc/scripts/library-coverage/comment-pr.py "$GITHUB_REPOSITORY" "$RUN_ID" |