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
27 changes: 5 additions & 22 deletions .github/actions/base/commit-check/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,32 +62,15 @@ runs:
bun i --frozen-lockfile
fi

- name: Install commitlint globally if no config
if: github.event_name == 'pull_request' && steps.commitlint-config.outputs.has-config == 'false'
shell: bash
working-directory: ${{ env.HOLDEX_WORKING_DIR || '.' }}
run: |
if [ "${{ inputs.package-manager }}" = "pnpm" ]; then
pnpm add -D @commitlint/config-conventional
elif [ "${{ inputs.package-manager }}" = "npm" ]; then
npm install --save-dev @commitlint/config-conventional
else
bun i -D @commitlint/config-conventional
fi

- name: Create commitlint config if missing
if: github.event_name == 'pull_request' && steps.commitlint-config.outputs.has-config == 'false'
shell: bash
working-directory: ${{ env.HOLDEX_WORKING_DIR || '.' }}
run: |
echo "extends:" > .commitlintrc.yml
echo " - '@commitlint/config-conventional'" >> .commitlintrc.yml

- name: Check PR title
if: github.event_name == 'pull_request'
shell: bash
working-directory: ${{ env.HOLDEX_WORKING_DIR || '.' }}
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: |
echo "$PR_TITLE" | commitlint
if [ "${{ steps.commitlint-config.outputs.has-config }}" = "true" ]; then
echo "$PR_TITLE" | commitlint
else
echo "$PR_TITLE" | commitlint --default-config
fi
2 changes: 1 addition & 1 deletion ACTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
- Intended as the first step before calling local-path actions from that checkout.

> [!WARNING]
> Keep `base/checkout` backward compatible. Workflows reference the action as `.../base/checkout@main`, so any breaking change merged to this repo’s `main` will immediately break consumers.

Check warning on line 28 in ACTIONS.md

View workflow job for this annotation

GitHub Actions / checks / checks

MD013

Line length 189 exceeds 80 characters
>
> This also applies to the `ref` input: existing workflows often pass `ref: main` (a branch name) for the _target_ repo checkout, so don’t change `ref` semantics in a way that would require a commit SHA.

Check warning on line 30 in ACTIONS.md

View workflow job for this annotation

GitHub Actions / checks / checks

MD013

Line length 203 exceeds 80 characters

### `base/setup-runtime`

Expand All @@ -42,7 +42,7 @@
- Validates allowed `package-manager` values.
- For `bun`: installs Bun runtime.
- For `pnpm`/`npm`: installs Node.js.
- For `pnpm`: installs pnpm using `package.json#packageManager` when present, otherwise falls back to `latest`.

Check warning on line 45 in ACTIONS.md

View workflow job for this annotation

GitHub Actions / checks / checks

MD013

Line length 111 exceeds 80 characters
- Respects `HOLDEX_WORKING_DIR` env var for `package.json` detection when set.

### `base/prettier`
Expand Down Expand Up @@ -80,7 +80,7 @@
- Filters/uses markdown-only changed files.
- Skips execution if no markdown files changed.
- Installs `rumdl` globally using selected package manager.
- Runs `rumdl check --output-format github --fail-on error` on changed markdown files.

Check warning on line 83 in ACTIONS.md

View workflow job for this annotation

GitHub Actions / checks / checks

MD013

Line length 86 exceeds 80 characters
- Respects `HOLDEX_WORKING_DIR` env var: all steps run in that directory when set.

### `base/commit-check`
Expand All @@ -98,7 +98,7 @@
- Detects commitlint configuration from standard config files or `package.json`.
- If config exists, installs dependencies in repo context:
- `bun i --frozen-lockfile`, `pnpm install --frozen-lockfile`, or `npm ci`.
- If config does not exist, installs `@commitlint/config-conventional` and creates fallback `.commitlintrc.yml`.
- If config does not exist, validates using `commitlint --default-config`.
- Validates PR title via `commitlint`.
- Respects `HOLDEX_WORKING_DIR` env var: all steps run in that directory when set.

Expand Down
Loading