Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/decision-records.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,13 @@ jobs:
env:
EVENT_NAME: ${{ github.event_name }}
HEAD_REF: ${{ github.head_ref }}
# The beta -> main release PR carries every record that landed on beta, and each one already passed the
# branch rule on its own PR. A fork's branch named beta is not this PR, so the repo is checked too.
RELEASE_PR: >-
${{ github.event_name == 'pull_request' && github.head_ref == 'beta' && github.base_ref == 'main'
&& github.event.pull_request.head.repo.full_name == github.repository }}
run: |
if [ "$EVENT_NAME" = "pull_request" ]; then
if [ "$EVENT_NAME" = "pull_request" ] && [ "$RELEASE_PR" != "true" ]; then
npx tsx scripts/ci/decisionRecords.ts check --branch "$HEAD_REF" --base HEAD^1
else
npx tsx scripts/ci/decisionRecords.ts check
Expand Down
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ gitlab-component-helper/
## Git Workflow

**Branch naming:** `<type>/<issue>-<short-description>`, with the issue number right after the type, for example `fix/412-hover-crash`. The type is one of the commitlint types: `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `build`, `ci`, `chore` or `revert`. Branches that tools name for themselves (`dependabot/`, `copilot/`, `claude/`) only get a warning from the Decision Records check, but when you pick the name, use a type prefix. See [Issues, branches, and records](#issues-branches-and-records).
**Target branch:** PRs go to `beta`. `main` only takes the `beta` -> `main` release PR, whose head is `beta` itself, so it has no issue number and only gets the warning.
**Target branch:** PRs go to `beta`. `main` only takes the `beta` -> `main` release PR, whose head is `beta` itself. The check skips the branch rule for that PR, since each record on `beta` already passed it on its own PR, and still validates the stores.
**Commit format:** `type(scope): description`
**Release:** release-it bumps the version + CHANGELOG on push to `beta`/`main` (ci.yml `release` job); publishing to the Marketplace is a manual `workflow_dispatch` (Publish / Publish Beta). See [`docs/RELEASING.md`](docs/RELEASING.md)

Expand Down Expand Up @@ -176,7 +176,7 @@ Rules:
| `'<field>' is required`, `must be one of ...`, `must be a list of text items`, `'date' must be a quoted 'YYYY-MM-DD'` | Fix that field in the record file. |
| `'supersedes' names '<KEY>', which is in neither ...` | Fix the key, or drop it from `supersedes`. |
| `could not diff against base '<ref>'` | Fetch the base first (`git fetch origin beta`) and pass a ref that exists. |
| Warning: `branch '...' has no issue number` | Only a warning. Fine for Dependabot, fork PRs and the `beta` -> `main` release PR. For anything else, move to a branch with an issue number. |
| Warning: `branch '...' has no issue number` | Only a warning. Fine for Dependabot and fork PRs. For anything else, move to a branch with an issue number. |

Fork PRs run the same check with a read-only token and no secrets. A fork's branch name is the contributor's choice, so a fork branch without an issue number gets the warning, and only fails if it adds a record.

Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/decisionRecordsBranch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export function branchFindings(added: readonly string[], branch: string): Findin
return {
errors: [],
warnings: [`branch '${branch}' has no issue number; name branches ${BRANCH_FORMAT} (${DOCS_POINTER}). `
+ 'Fine for Dependabot, forks and the beta -> main release PR'],
+ 'Fine for Dependabot and forks'],
};
}
if (issue === undefined) {
Expand Down
Loading