mirror of
https://github.com/lancedb/lancedb.git
synced 2026-12-03 07:45:17 +00:00
GitHub's default Actions policy blocks `pull_request_target` in public repositories before any jobs start. The same annotation appears on a fork PR and a repository branch. [Fork run](https://github.com/lancedb/lancedb/actions/runs/47003484815) · [Repository branch run](https://github.com/lancedb/lancedb/actions/runs/46997657674) `PR Checks` validates the squash-merge title and description on `pull_request` with an empty token permission set. Commitlint reports failures in the check log. The default-branch `PR Labels` workflow uses `pull-requests: write` to append release and language labels after it verifies the current open PR and reads its metadata and changed paths through the GitHub API. The TypeScript rule covers the current `nodejs/` directory. GitHub activates the `workflow_run` subscriber once the workflow file reaches the default branch. Local verification used GitHub data from #4918 to exercise fork lookup, label rules, and rejection of stale or ambiguous matches with the write stubbed.
44 lines
1.5 KiB
YAML
44 lines
1.5 KiB
YAML
name: PR Checks
|
|
|
|
on:
|
|
pull_request:
|
|
types: [opened, edited, synchronize, reopened]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
commitlint:
|
|
name: Verify PR title / description conforms to semantic-release
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version: "24"
|
|
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
|
|
with:
|
|
version: 11.1.1
|
|
# These rules are disabled because Github will always ensure there
|
|
# is a blank line between the title and the body and Github will
|
|
# word wrap the description field to ensure a reasonable max line
|
|
# length.
|
|
- run: >
|
|
echo 'module.exports = {
|
|
"rules": {
|
|
"body-max-line-length": [0, "always", Infinity],
|
|
"footer-max-line-length": [0, "always", Infinity],
|
|
"body-leading-blank": [0, "always"]
|
|
}
|
|
}' > .commitlintrc.js
|
|
- name: Check PR title and description
|
|
shell: bash
|
|
run: |
|
|
jq -er '.pull_request | select(.title != null) | .title + "\n\n" + (.body // "")' "$GITHUB_EVENT_PATH" | \
|
|
pnpm dlx \
|
|
--package @commitlint/cli@21.2.2 \
|
|
--package @commitlint/config-conventional@21.2.2 \
|
|
commitlint --extends @commitlint/config-conventional --verbose
|