climaybe 1.7.0 → 1.7.2

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/bin/version.txt CHANGED
@@ -1 +1 @@
1
- 1.7.0
1
+ 1.7.2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "climaybe",
3
- "version": "1.7.0",
3
+ "version": "1.7.2",
4
4
  "description": "Shopify CI/CD CLI — scaffolds workflows, branch strategy, and store config for single-store and multi-store theme repos",
5
5
  "type": "module",
6
6
  "bin": {
@@ -12,6 +12,8 @@ const COMMITLINT_DEPS = {
12
12
  const COMMITLINT_CONFIG = `/** @type {import('@commitlint/types').UserConfig} */
13
13
  module.exports = {
14
14
  extends: ['@commitlint/config-conventional'],
15
+ defaultIgnores: true,
16
+ ignores: [(commit) => /^Merge\\s/i.test((commit || '').split('\\n')[0] || '')],
15
17
  rules: {
16
18
  'type-enum': [
17
19
  2,
@@ -25,7 +27,9 @@ module.exports = {
25
27
  };
26
28
  `;
27
29
 
28
- const HUSKY_COMMIT_MSG = `npx --no-install commitlint --edit "$1"
30
+ const HUSKY_COMMIT_MSG = `# Ensure npx is on PATH when Git/IDE run with a minimal env (e.g. Cursor, VS Code)
31
+ export PATH="/usr/local/bin:/opt/homebrew/bin:$PATH"
32
+ npx --no-install commitlint --edit "$1"
29
33
  `;
30
34
 
31
35
  const CURSOR_COMMIT_SKILL = `---
@@ -30,7 +30,7 @@ jobs:
30
30
  contents: read
31
31
  models: read
32
32
  outputs:
33
- changelog: ${{ steps.ai.outputs.changelog }}
33
+ changelog: ${{ steps.ai.outputs.changelog || steps.no_commits.outputs.changelog }}
34
34
 
35
35
  steps:
36
36
  - uses: actions/checkout@v4
@@ -43,25 +43,21 @@ jobs:
43
43
  COMMITS=$(git log --pretty=format:"%h %s" ${{ inputs.base_ref }}..${{ inputs.head_ref }} 2>/dev/null || echo "")
44
44
  if [ -z "$COMMITS" ]; then
45
45
  echo "No commits found between ${{ inputs.base_ref }} and ${{ inputs.head_ref }}"
46
- echo "commits=" >> $GITHUB_OUTPUT
46
+ echo "has_commits=false" >> $GITHUB_OUTPUT
47
47
  exit 0
48
48
  fi
49
- # Keep commits as multiline plain text
50
- {
51
- echo "commits<<COMMITS_EOF"
52
- echo "$COMMITS"
53
- echo "COMMITS_EOF"
54
- } >> $GITHUB_OUTPUT
49
+ # File avoids huge env vars and shell escaping; jq reads via --rawfile (never use --argjson for raw log text).
50
+ printf '%s\n' "$COMMITS" > commits-for-ai.txt
51
+ echo "has_commits=true" >> $GITHUB_OUTPUT
55
52
 
56
53
  - name: Generate changelog (Gemini -> GitHub Models fallback)
57
54
  id: ai
58
- if: steps.commits.outputs.commits != ''
55
+ if: steps.commits.outputs.has_commits == 'true'
59
56
  env:
60
57
  GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
61
58
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62
- COMMITS_RAW: ${{ steps.commits.outputs.commits }}
63
59
  run: |
64
- COMMITS="$COMMITS_RAW"
60
+ COMMITS=$(cat commits-for-ai.txt)
65
61
  PROVIDER="fallback"
66
62
 
67
63
  PROMPT=$(cat <<'PROMPT_EOF'
@@ -86,7 +82,7 @@ jobs:
86
82
  if [ -n "$GEMINI_API_KEY" ]; then
87
83
  PAYLOAD=$(jq -n \
88
84
  --arg prompt "$PROMPT" \
89
- --arg commits "$COMMITS" \
85
+ --rawfile commits commits-for-ai.txt \
90
86
  '{
91
87
  "contents": [{
92
88
  "parts": [{"text": ($prompt + "\n" + $commits)}]
@@ -112,7 +108,7 @@ jobs:
112
108
  if [ -z "$CHANGELOG" ] || [ "$CHANGELOG" = "null" ]; then
113
109
  GH_PAYLOAD=$(jq -n \
114
110
  --arg prompt "$PROMPT" \
115
- --arg commits "$COMMITS" \
111
+ --rawfile commits commits-for-ai.txt \
116
112
  '{
117
113
  "model": "gpt-4o-mini",
118
114
  "messages": [
@@ -157,7 +153,8 @@ jobs:
157
153
  } >> $GITHUB_OUTPUT
158
154
 
159
155
  - name: Fallback if no commits
160
- if: steps.commits.outputs.commits == ''
156
+ id: no_commits
157
+ if: steps.commits.outputs.has_commits != 'true'
161
158
  run: |
162
159
  {
163
160
  echo "changelog<<CHANGELOG_EOF"