Skip to content

liferay/liferay-portal / .claude/skills/pr-check

pr-check

Verified

Check that a PR is ready to be sent for review.

FileKindSize
SKILL.mdskill md36.5 KB
find_modules.shexecutablescript1.4 KB
references/testing.mdmarkdown5.4 KB
select_paths.shexecutablescript2.2 KB
select_validations.shexecutablescript1.1 KB
validations/branch/bean-param-util-getter.mdmarkdown6.6 KB
validations/branch/bnd-content.mdmarkdown15.2 KB
validations/branch/bnd-dsannotations-options.mdmarkdown9.1 KB
validations/branch/cache-field-usage.mdmarkdown13.9 KB
validations/branch/concurrent-mapper-hash-map-usage.mdmarkdown7.5 KB
validations/branch/html-escaping.mdmarkdown2.6 KB
validations/branch/pr-reviewer.mdmarkdown6.6 KB
validations/branch/redundant-assert-message.mdmarkdown13.5 KB
validations/branch/required-configuration-policy.mdmarkdown7.9 KB
validations/branch/service-holder-usage.mdmarkdown8.3 KB
validations/branch/service-registration.mdmarkdown3.7 KB
validations/branch/source-format.mdmarkdown4.1 KB
validations/branch/startup-sync-usage.mdmarkdown10.6 KB
validations/branch/transaction-usage.mdmarkdown4.0 KB
validations/branch/unused-project-dependencies.mdmarkdown18.5 KB
validations/portal/baseline.mdmarkdown14.0 KB
validations/portal/cross-module-compile.mdmarkdown7.9 KB
validations/portal/full-portal-build.mdmarkdown1.4 KB
validations/portal/go-generate.mdmarkdown2.8 KB
validations/portal/go-source-format.mdmarkdown1.9 KB
validations/portal/helm-unit-test-order.mdmarkdown1.4 KB
validations/portal/instance-wrapper-build.mdmarkdown656 B
validations/portal/java-unit-test.mdmarkdown6.7 KB
validations/portal/javascript-unit-test.mdmarkdown7.7 KB
validations/portal/module-registration.mdmarkdown7.8 KB
validations/portal/per-module-compile.mdmarkdown10.4 KB
validations/portal/portlet-title.mdmarkdown1.1 KB
validations/portal/poshi-syntax.mdmarkdown336 B
validations/portal/pql-validation.mdmarkdown516 B
validations/portal/rest-builder.mdmarkdown938 B
validations/portal/service-builder.mdmarkdown1.6 KB
validations/portal/structural-smoke.mdmarkdown3.9 KB
validations/portal/theme-build.mdmarkdown2.0 KB
validations/workspaces/generated-file.mdmarkdown2.5 KB
validations/workspaces/source-format.mdmarkdown2.0 KB
validations/workspaces/workspace-compile.mdmarkdown1.8 KB
validations/workspaces/workspace-java-unit-test.mdmarkdown1.7 KB
validations/workspaces/workspace-javascript-unit-test.mdmarkdown1.9 KB

validations/portal/theme-build.md

View on GitHub
# Theme Build

Rebuilds every theme when a shared stylesheet changes, since a change to `clay-css` or to the `frontend-theme-styled` and `frontend-theme-unstyled` parent themes rebuilds no theme on its own. `frontend-css-common` is left out on purpose. Themes take it from its published artifact rather than from the branch, so a theme build cannot see a change to it.

## Match

`^modules/apps/frontend-js/frontend-js-clay-web/clay/clay-css/|^modules/apps/frontend-theme/frontend-theme-(styled|unstyled)/`

## Command

A shared CSS change fans out to every theme. Select each module under `modules/apps` whose `package.json` declares a `liferayTheme` block, and take its Gradle project path. Scan `modules/apps` rather than `modules/apps/frontend-theme`, or the scan misses the commerce themes, which take the same `styled` parent and are affected by the same change:

```bash
(cd "${REPO_ROOT}" && command grep --files-with-matches --include='package.json' --recursive '"liferayTheme"' modules/apps) \
	| command grep --invert-match --regexp='/node_modules/' --regexp='/gradleTest/' \
	| bash "${SKILL_DIR}/find_modules.sh" "${MERGE_BASE}" \
	| cut -d " " -f1 \
	| sed "s#^modules/##; s#/#:#g" \
	| sort --unique
```

Run `packageRunBuild` (not `deploy`) per theme:

```bash
("${REPO_ROOT}/gradlew" \
	--project-dir "${REPO_ROOT}/modules" \
	:<path>:packageRunBuild)
```

The build needs `node` and an `npm`/`yarn` install and builds both parent themes once; that work amortizes across the theme set.

FAIL when a theme's build reports `BUILD FAILED`, and name the theme and the error. Selecting no theme at all is a broken scan rather than a pass, since a shared CSS change reaches every theme the modules build contains; report that as a FAIL too. PASS when every selected theme reports `BUILD SUCCESSFUL`.

## Checklist

```
- [ ] (One subitem per theme:) packageRunBuild <theme path>
```

## Time Estimate

~30 sec - 2 min per theme; the first also pays node download, install, and parent theme builds.
receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementationStars: 323kUpdated Claude CodeCodexVerifiedInstall
requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirementsStars: 323kUpdated Claude CodeCodexVerifiedInstall
using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallbackStars: 323kUpdated Claude CodeCodexVerifiedInstall
verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions alwaysStars: 323kUpdated Claude CodeCodexVerifiedInstall