liferay/liferay-portal / .claude/skills/pr-check
pr-check
VerifiedCheck that a PR is ready to be sent for review.
find_modules.sh
View on GitHub#!/usr/bin/env bash
function main {
cd "$(git rev-parse --show-toplevel)" || exit 1
local path
while IFS= read -r path
do
local marker_files="bnd.bnd build.xml gulpfile.js src/main/resources/application.properties"
local themes=true
if echo "${path}" | grep --extended-regexp "^workspaces/[^/]+-workspace/" > /dev/null
then
marker_files="bnd.bnd client-extension.yaml"
themes=false
fi
local dir
local module=-
dir=$(dirname "${path}")
while [[ ${dir} != . ]] &&
[[ ${dir} != / ]]
do
if _has_marker_file "${dir}" "${marker_files}" "${1}" ||
{ [[ ${themes} == true ]] && _is_theme "${dir}" "${1}"; }
then
module=${dir}
fi
dir=$(dirname "${dir}")
done
echo "${module} ${path}"
done
}
function _has_marker_file {
if [[ ${1} == modules ]]
then
return 1
fi
local marker_file
for marker_file in ${2}
do
if [[ -e ${1}/${marker_file} ]]
then
return 0
fi
done
if [[ -d ${1} ]]
then
return 1
fi
for marker_file in ${2}
do
if git cat-file -e "${3}:${1}/${marker_file}" 2> /dev/null
then
return 0
fi
done
return 1
}
function _is_theme {
if [[ ${1} == modules ]]
then
return 1
fi
if [[ -d ${1} ]]
then
grep --quiet '"liferayTheme"' "${1}/package.json" 2> /dev/null
return
fi
git show "${2}:${1}/package.json" 2> /dev/null | grep --quiet '"liferayTheme"'
}
main "${@}"Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| 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 implementation | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| 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 fallback | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| 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 always | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |