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
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ jobs:
run: |
set -euo pipefail
SCORE_ARGS=()
BASELINE_ARGS=()
if [ -n "${BASE_SHA:-}" ]; then
if ! git cat-file -e "${BASE_SHA}^{commit}"; then
git fetch --no-tags --depth=1 origin "${BASE_SHA}"
Expand All @@ -111,10 +112,11 @@ jobs:
git worktree add --detach "${BASE_DIR}" "${BASE_SHA}"
ln -s "${GITHUB_WORKSPACE}/ui/node_modules" "${BASE_DIR}/ui/node_modules"
(cd "${BASE_DIR}" && python scripts/code_health.py --json) > /tmp/code-health-pr-base.json
BASELINE_ARGS=(--baseline /tmp/code-health-pr-base.json)
SCORE_ARGS=(--score-baseline /tmp/code-health-pr-base.json --score-baseline-label "PR base")
fi
set +e
python scripts/code_health.py --check --markdown --publish-pr-comment "${SCORE_ARGS[@]}" | tee code-health.md
python scripts/code_health.py --check --markdown --publish-pr-comment "${BASELINE_ARGS[@]}" "${SCORE_ARGS[@]}" | tee code-health.md
STATUS=${PIPESTATUS[0]}
set -e
if [ -n "${GITHUB_STEP_SUMMARY:-}" ]; then
Expand Down
Loading