clud-bug 0.5.7 → 0.5.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clud-bug",
3
- "version": "0.5.7",
3
+ "version": "0.5.8",
4
4
  "description": "Claude PR review with project-aware skills. CLI installs a working GitHub Actions workflow and curates skills from skills.sh.",
5
5
  "homepage": "https://cludbug.dev",
6
6
  "bugs": "https://github.com/thrillmot/clud-bug/issues",
@@ -1,4 +1,4 @@
1
- # clud-bug-template-version: v1
1
+ # clud-bug-template-version: v2
2
2
  name: Clud Bug 🐛 Crawls Your Code
3
3
 
4
4
  on:
@@ -168,23 +168,9 @@ jobs:
168
168
  with confirmed: true.
169
169
  If there are no critical issues, post a one-line comment saying so.
170
170
 
171
- # Strict-mode gate — see workflow.yml.tmpl for full design notes.
171
+ # Strict-mode gate — composite action; see workflow.yml.tmpl for design notes.
172
172
  - name: Strict mode — fail check on critical findings
173
173
  if: success()
174
- env:
175
- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
176
- PR_NUMBER: ${{ github.event.pull_request.number }}
177
- run: |
178
- BASE_MANIFEST=$(git show "origin/${{ github.base_ref }}:.claude/skills/.clud-bug.json" 2>&1) || {
179
- echo "::warning::Base manifest not found on ${{ github.base_ref }} — strict mode disabled for this run."
180
- exit 0
181
- }
182
- STRICT=$(echo "$BASE_MANIFEST" | node -e "let s='';process.stdin.on('data',c=>s+=c);process.stdin.on('end',()=>{try{console.log(JSON.parse(s).strictMode===true)}catch(e){console.log('false')}})")
183
- [ "$STRICT" = "true" ] || exit 0
184
- LATEST=$(gh api "repos/${{ github.repository }}/issues/${PR_NUMBER}/comments?sort=created&direction=desc&per_page=100" \
185
- --jq '[.[] | select(.user.login == "claude[bot]" and (.body | startswith("## 🐛 Clud Bug review")))][0].body // ""')
186
- if echo "$LATEST" | head -n1 | grep -q "Clud Bug review — critical findings"; then
187
- echo "::error title=Clud Bug 🐛::Critical issues found and strictMode is enabled — failing this check."
188
- echo "::error::See the latest Clud Bug review comment for details. Push a fix and the gate will clear on the next run."
189
- exit 1
190
- fi
174
+ uses: thrillmot/clud-bug/.github/actions/strict-mode-gate@v0.5.8
175
+ with:
176
+ github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -1,4 +1,4 @@
1
- # clud-bug-template-version: v1
1
+ # clud-bug-template-version: v2
2
2
  name: Clud Bug 🐛 Crawls Your Code
3
3
 
4
4
  on:
@@ -169,23 +169,9 @@ jobs:
169
169
  with confirmed: true.
170
170
  If there are no critical issues, post a one-line comment saying so.
171
171
 
172
- # Strict-mode gate — see workflow.yml.tmpl for full design notes.
172
+ # Strict-mode gate — composite action; see workflow.yml.tmpl for design notes.
173
173
  - name: Strict mode — fail check on critical findings
174
174
  if: success()
175
- env:
176
- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
177
- PR_NUMBER: ${{ github.event.pull_request.number }}
178
- run: |
179
- BASE_MANIFEST=$(git show "origin/${{ github.base_ref }}:.claude/skills/.clud-bug.json" 2>&1) || {
180
- echo "::warning::Base manifest not found on ${{ github.base_ref }} — strict mode disabled for this run."
181
- exit 0
182
- }
183
- STRICT=$(echo "$BASE_MANIFEST" | node -e "let s='';process.stdin.on('data',c=>s+=c);process.stdin.on('end',()=>{try{console.log(JSON.parse(s).strictMode===true)}catch(e){console.log('false')}})")
184
- [ "$STRICT" = "true" ] || exit 0
185
- LATEST=$(gh api "repos/${{ github.repository }}/issues/${PR_NUMBER}/comments?sort=created&direction=desc&per_page=100" \
186
- --jq '[.[] | select(.user.login == "claude[bot]" and (.body | startswith("## 🐛 Clud Bug review")))][0].body // ""')
187
- if echo "$LATEST" | head -n1 | grep -q "Clud Bug review — critical findings"; then
188
- echo "::error title=Clud Bug 🐛::Critical issues found and strictMode is enabled — failing this check."
189
- echo "::error::See the latest Clud Bug review comment for details. Push a fix and the gate will clear on the next run."
190
- exit 1
191
- fi
175
+ uses: thrillmot/clud-bug/.github/actions/strict-mode-gate@v0.5.8
176
+ with:
177
+ github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -1,4 +1,4 @@
1
- # clud-bug-template-version: v1
1
+ # clud-bug-template-version: v2
2
2
  name: Clud Bug 🐛 Crawls Your Code
3
3
 
4
4
  on:
@@ -189,12 +189,14 @@ jobs:
189
189
  with confirmed: true.
190
190
  If there are no critical issues, post a one-line comment saying so.
191
191
 
192
- # Strict-mode gate. Fails the check when both
193
- # (a) the BASE ref's .claude/skills/.clud-bug.json has
194
- # { "strictMode": true } read from base so a PR can't opt
195
- # itself out of strict mode by editing its own manifest, AND
196
- # (b) the LATEST clud-bug review comment on this PR has a body
197
- # whose FIRST LINE is "## 🐛 Clud Bug review critical findings".
192
+ # Strict-mode gate. Fails the check when the BASE ref's manifest
193
+ # has { "strictMode": true } AND the latest clud-bug review's first
194
+ # line starts with "## 🐛 Clud Bug review critical findings".
195
+ #
196
+ # Logic lives in the composite action so it's revised once across
197
+ # all 3 templates + the App runtime. Pinned to the same clud-bug
198
+ # tag the user installed (rendered by `clud-bug init`), so the
199
+ # action's contract is stable for the lifetime of that install.
198
200
  #
199
201
  # if: success() — only run when claude-code-action succeeded. If the
200
202
  # action errored, no new comment was posted for this run; falling back
@@ -202,30 +204,6 @@ jobs:
202
204
  # Letting the action's own failure fail the check is louder and right.
203
205
  - name: Strict mode — fail check on critical findings
204
206
  if: success()
205
- env:
206
- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
207
- PR_NUMBER: ${{ github.event.pull_request.number }}
208
- run: |
209
- # Loud failure if the base manifest can't be read — silently falling
210
- # back to advisory would silently disable strict mode for every
211
- # opted-in repo. (Requires fetch-depth: 0 on the checkout above.)
212
- BASE_MANIFEST=$(git show "origin/${{ github.base_ref }}:.claude/skills/.clud-bug.json" 2>&1) || {
213
- echo "::warning::Base manifest not found on ${{ github.base_ref }} — strict mode disabled for this run."
214
- exit 0
215
- }
216
- STRICT=$(echo "$BASE_MANIFEST" | node -e "let s='';process.stdin.on('data',c=>s+=c);process.stdin.on('end',()=>{try{console.log(JSON.parse(s).strictMode===true)}catch(e){console.log('false')}})")
217
- [ "$STRICT" = "true" ] || exit 0
218
-
219
- # Use startswith (not regex contains) so comments that *quote* the
220
- # sentinel header (other reviews, @claude responses, meta-PRs about
221
- # strict mode itself) don't get picked up as "the latest review."
222
- LATEST=$(gh api "repos/${{ github.repository }}/issues/${PR_NUMBER}/comments?sort=created&direction=desc&per_page=100" \
223
- --jq '[.[] | select(.user.login == "claude[bot]" and (.body | startswith("## 🐛 Clud Bug review")))][0].body // ""')
224
-
225
- # Scope the critical-findings match to the FIRST LINE so quoted
226
- # sentinels deeper in the review can't trip the gate.
227
- if echo "$LATEST" | head -n1 | grep -q "Clud Bug review — critical findings"; then
228
- echo "::error title=Clud Bug 🐛::Critical issues found and strictMode is enabled — failing this check."
229
- echo "::error::See the latest Clud Bug review comment for details. Push a fix and the gate will clear on the next run."
230
- exit 1
231
- fi
207
+ uses: thrillmot/clud-bug/.github/actions/strict-mode-gate@v0.5.8
208
+ with:
209
+ github-token: ${{ secrets.GITHUB_TOKEN }}