Fix scheduler prescaler calculation #107
This file contains hidden or 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: Changeset Required | |
| on: | |
| pull_request: | |
| branches: | |
| - development | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| - ready_for_review | |
| - edited | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| concurrency: | |
| group: release-plan-${{ github.event.pull_request.number }} | |
| cancel-in-progress: true | |
| jobs: | |
| changeset-required: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Skip validation for automated release PRs | |
| if: github.head_ref == 'release/next' | |
| run: | | |
| echo "Automated release PR detected; changeset validation is skipped." >> "$GITHUB_STEP_SUMMARY" | |
| - name: Validate PR changeset | |
| if: github.head_ref != 'release/next' | |
| run: | | |
| python3 tools/release.py validate-pr \ | |
| --base "${{ github.event.pull_request.base.sha }}" \ | |
| --head "${{ github.event.pull_request.head.sha }}" | |
| - name: Build release preview | |
| if: github.head_ref != 'release/next' | |
| run: | | |
| python3 tools/release.py preview --format markdown > .release-plan.md | |
| cat .release-plan.md >> "$GITHUB_STEP_SUMMARY" | |
| - name: Upsert PR comment | |
| if: github.head_ref != 'release/next' | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const fs = require('fs'); | |
| const marker = '<!-- st-lib-release-plan -->'; | |
| const body = `${marker}\n${fs.readFileSync('.release-plan.md', 'utf8')}`; | |
| const owner = context.repo.owner; | |
| const repo = context.repo.repo; | |
| const issue_number = context.issue.number; | |
| const comments = await github.paginate(github.rest.issues.listComments, { | |
| owner, | |
| repo, | |
| issue_number, | |
| per_page: 100, | |
| }); | |
| const existing = comments.find((comment) => comment.body && comment.body.includes(marker)); | |
| if (existing) { | |
| await github.rest.issues.updateComment({ | |
| owner, | |
| repo, | |
| comment_id: existing.id, | |
| body, | |
| }); | |
| } else { | |
| await github.rest.issues.createComment({ | |
| owner, | |
| repo, | |
| issue_number, | |
| body, | |
| }); | |
| } |