GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||
GeezerVison is showing github.com — ci(release): also release on refactor/perf commits (keep patch-only) by Episkey-G · Pull Request #5 · Episkey-G/ucloud-cli Conversation
Owner
概要把 背景原检测器只用 改动
验证(本地)
|
| if git log --format='%s' "$CURRENT"..HEAD \ | ||
| | grep -qE '^(refactor|perf)(\([^)]+\))?!?:'; then |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Include merge commit bodies in refactor detection
When a refactor/perf PR is merged with GitHub's normal merge commit and the branch commits have non-conventional subjects, the only conventional line is the PR title in the merge commit body; this detector streams only %s subjects, so it sees Merge pull request ... plus the branch subjects and leaves RELEASABLE empty. I checked .github/workflows/pr-gate.yml, and the gate validates only PR_TITLE rather than every commit subject, so this workflow can still skip exactly the refactor/perf-only releases this change is meant to enable unless the individual commits also happen to be conventional.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Good catch — addressed in 8d83ab6. The detector now scans %B (full message), so a refactor/perf type appearing only in a merge-commit body / PR title is caught.
Review also surfaced a blocker in the original 5a1a8fd: git log | grep -q under the Actions default bash -o pipefail made git log take SIGPIPE on grep's early exit, flipping the pipeline non-zero and wrongly skipping the release (reproduced on the real v0.3.4..HEAD range). Fixed by capturing to a var and matching via here-string (no pipe). Verified under bash -eo pipefail: real range → release, merge-body type → release, chore/docs/ci/test/style → skip, 5M-line input → no SIGPIPE.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…-aware Two fixes from PR #5 review: - BLOCKER (self-review): 'git log | grep -q' under bash -o pipefail (the GitHub Actions default shell) makes git log take SIGPIPE when grep matches early, flipping the whole pipeline non-zero, so the release is WRONGLY SKIPPED — reproduced on the real v0.3.4..HEAD range (printed NO-MATCH despite 11 matching refactor commits). Capture git log to a var and match via here-string (no pipe -> no SIGPIPE). - P2 (Codex): scan %B (full commit message) instead of %s, so a refactor/perf type that only appears in a merge-commit body / PR title is also detected. Verified under bash -eo pipefail: real range -> release; merge-body-only type -> release; chore/docs/ci/test/style -> skip; 5M-line input -> no SIGPIPE. Co-Authored-By: Claude Opus 4.8 <[email protected]>
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.