code-foundry 0.39.1 → 0.39.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.
@@ -66,10 +66,16 @@ jobs:
66
66
  # existing-promotion-PR lookup uses authenticated REST (gh api)
67
67
  # rather than gh pr list, which issues a GraphQL query that
68
68
  # NiftyLeague's long-lived fine-grained token policy rejects. The
69
- # REST query keeps the exact base/head/state filter and the per_page=1
70
- # cap (existing is 0 or 1) and fails closed on any API error.
71
- EXISTING=$(gh api \
72
- "repos/${GITHUB_REPOSITORY}/pulls?base=main&head=${PROMOTION_BRANCH}&state=open&per_page=1" \
69
+ # REST query qualifies head as owner:branch; GitHub otherwise ignores
70
+ # the incomplete head filter and can count an unrelated open PR. The
71
+ # exact base/head/state filter and per_page=1 cap keep existing at 0
72
+ # or 1, and the lookup fails closed on any API error.
73
+ EXISTING=$(gh api --method GET \
74
+ "repos/${GITHUB_REPOSITORY}/pulls" \
75
+ --field base=main \
76
+ --field head="${GITHUB_REPOSITORY_OWNER}:${PROMOTION_BRANCH}" \
77
+ --field state=open \
78
+ --field per_page=1 \
73
79
  --jq 'length')
74
80
  MAIN_TREE=$(gh api "repos/${GITHUB_REPOSITORY}/commits/main" --jq '.commit.tree.sha')
75
81
  STAGING_TREE=$(gh api "repos/${GITHUB_REPOSITORY}/commits/staging" --jq '.commit.tree.sha')
@@ -285,8 +291,12 @@ jobs:
285
291
  # the same authenticated REST query as the Check step, always with
286
292
  # the short-lived workflow token; gh pr list issues a GraphQL query
287
293
  # that NiftyLeague's long-lived fine-grained token policy rejects.
288
- EXISTING_NUMBER=$(GH_TOKEN="${{ github.token }}" gh api \
289
- "repos/${GITHUB_REPOSITORY}/pulls?base=main&head=${PROMOTION_BRANCH}&state=open&per_page=1" \
294
+ EXISTING_NUMBER=$(GH_TOKEN="${{ github.token }}" gh api --method GET \
295
+ "repos/${GITHUB_REPOSITORY}/pulls" \
296
+ --field base=main \
297
+ --field head="${GITHUB_REPOSITORY_OWNER}:${PROMOTION_BRANCH}" \
298
+ --field state=open \
299
+ --field per_page=1 \
290
300
  --jq '.[0].number // empty')
291
301
  if [ -z "$EXISTING_NUMBER" ]; then
292
302
  echo 'Pull request creation failed and no existing promotion PR was found.' >&2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.39.2](https://github.com/0xPlayerOne/code-foundry/compare/v0.39.1...v0.39.2) (2026-08-29)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **release:** qualify promotion PR head filters ([75a0985](https://github.com/0xPlayerOne/code-foundry/commit/75a09856d764aafc1cd301ae68121e187c43e2d1))
9
+
3
10
  ## [0.39.1](https://github.com/0xPlayerOne/code-foundry/compare/v0.39.0...v0.39.1) (2026-08-29)
4
11
 
5
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "code-foundry",
3
- "version": "0.39.1",
3
+ "version": "0.39.2",
4
4
  "description": "A fast, language-aware repository factory for agent-ready workflows, testing, security, and release automation.",
5
5
  "type": "module",
6
6
  "license": "AGPL-3.0-or-later",