feat(builders): support typed function arguments #656
Workflow file for this run
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: PR Title Check | |
| on: | |
| # synchronize is required even though a push changes neither the title nor the | |
| # description: "PR title / description conforms to semantic-release" is a | |
| # required status check, and GitHub keys required checks to the head commit. | |
| # Without synchronize, pushing a new commit strands the check on the previous | |
| # commit and blocks the PR indefinitely. | |
| pull_request_target: | |
| types: [opened, edited, synchronize, reopened] | |
| # Serialize runs for the same PR so the comment job can't race with itself, but | |
| # never cancel in progress: a Dependabot rebase force-pushes and edits the PR | |
| # body at once, firing synchronize and edited on the same commit. Cancelling one | |
| # leaves a cancelled check-run on the head commit that fails the status rollup | |
| # (#198). Letting both finish yields two harmless successes instead. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: false | |
| # Default to the minimum read-only token for all jobs. | |
| permissions: | |
| contents: read | |
| jobs: | |
| commitlint: | |
| name: PR title / description conforms to semantic-release | |
| runs-on: ubuntu-latest | |
| outputs: | |
| outcome: ${{ steps.commitlint.outcome }} | |
| steps: | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: "24" | |
| - run: npm install @commitlint/config-conventional | |
| - run: > | |
| echo 'module.exports = { | |
| // Workaround for https://github.com/dependabot/dependabot-core/issues/5923 | |
| "ignores": [ | |
| (message) => /^Bumps \[.+]\(.+\) from .+ to .+\.$/m.test(message), | |
| (message) => /^Updates the requirements on .+ to permit the latest version\.$/m.test(message) | |
| ], | |
| "rules": { | |
| "body-max-line-length": [0, "always", Infinity], | |
| "footer-max-line-length": [0, "always", Infinity], | |
| "body-leading-blank": [0, "always"] | |
| } | |
| }' > .commitlintrc.js | |
| - id: commitlint | |
| continue-on-error: true | |
| run: npx commitlint --extends @commitlint/config-conventional --verbose <<< $COMMIT_MSG | |
| env: | |
| COMMIT_MSG: > | |
| ${{ github.event.pull_request.title }} | |
| ${{ github.event.pull_request.body }} | |
| comment: | |
| name: Post / remove PR comment | |
| runs-on: ubuntu-latest | |
| needs: commitlint | |
| permissions: | |
| pull-requests: write | |
| steps: | |
| - uses: actions/github-script@v9 | |
| with: | |
| script: | | |
| // Hidden marker used to find this job's comment regardless of wording. | |
| const marker = "<!-- pr-title-check -->"; | |
| const message = `${marker} | |
| **ACTION NEEDED** | |
| Substrait follows the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) for release automation. | |
| The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification.`; | |
| const passed = "${{ needs.commitlint.outputs.outcome }}" === "success"; | |
| // Find an existing comment from this job, if any. | |
| const comments = await github.paginate(github.rest.issues.listComments, { | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.issue.number, | |
| }); | |
| const existing = comments.find((c) => c.body.includes(marker)); | |
| if (passed) { | |
| // Clean up the comment now that the check passes. | |
| if (existing) { | |
| await github.rest.issues.deleteComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| comment_id: existing.id, | |
| }); | |
| } | |
| return; | |
| } | |
| // Check failed: post the comment if it isn't already there, then fail the job. | |
| if (!existing) { | |
| await github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.issue.number, | |
| body: message, | |
| }); | |
| } | |
| core.setFailed( | |
| "PR title and description do not follow the Conventional Commits specification." | |
| ); |