Skip to content

Unified engagement time bug #42

Unified engagement time bug

Unified engagement time bug #42

name: Release PR Checks
on:
pull_request:
branches:
- main
jobs:
check-release:
if: startsWith(github.head_ref, 'release')
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyyaml semver
- name: Run release checks
run: |
python .github/scripts/check_release.py > errors.txt
- name: Post PR comment on failure
if: failure()
uses: actions/github-script@v6
with:
script: |
const fs = require('fs');
const errors = fs.readFileSync('errors.txt', 'utf8');
github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: `### Release PR Checks Failed\n\n${errors}`
})
- name: Post PR comment on success
if: success()
uses: actions/github-script@v6
with:
script: |
const fs = require('fs');
const errors = fs.readFileSync('errors.txt', 'utf8');
github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: `### Release PR Checks Passed\n\n${errors}`
})