@norskvideo/ctl-dev-kit 0.2.61 → 0.2.63

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.
@@ -67,10 +67,13 @@ permissions:
67
67
  contents: read
68
68
  checks: read
69
69
  pull-requests: read
70
- # The workflow runs on a PR's head: whether each gating tier has passed there.
71
- actions: read
72
- # The rebuild dispatch and its marker comment go through the PAT (WRITE_TOKEN),
73
- # like the merges; this token only reads.
70
+ # Reads which gating tiers have passed on a PR's head, and writes Actions:
71
+ # re-running a cancelled tier and dispatching a bot's workflow to rebuild a
72
+ # conflicting PR. Those went through the PAT, which has no Actions write, and
73
+ # failed with HTTP 403 in every repo (2026-10-10). A workflow_dispatch made
74
+ # with this token does start a run (exempt from the recursion guard). Merges,
75
+ # branch deletes and comments stay on the PAT (WRITE_TOKEN).
76
+ actions: write
74
77
 
75
78
  concurrency:
76
79
  # One at a time per repo, and never cancelled: a merge half-done by a run that
@@ -99,6 +102,9 @@ jobs:
99
102
  curl_as() { local tok="$1"; shift; curl -sS --retry 3 --retry-all-errors -H "Authorization: Bearer $tok" -H "Accept: application/vnd.github+json" "$@"; }
100
103
  gh_api() { curl_as "$READ_TOKEN" "$@"; }
101
104
  gh_write() { curl_as "$WRITE_TOKEN" "$@"; }
105
+ # Actions writes (re-run a tier, dispatch a bot's workflow) use the
106
+ # job token, which permissions grant actions: write; the PAT cannot.
107
+ gh_actions() { curl_as "$READ_TOKEN" "$@"; }
102
108
  # An API error is a JSON object with a message; say what it was rather
103
109
  # than letting jq fail later on a missing field.
104
110
  expect() {
@@ -232,7 +238,7 @@ jobs:
232
238
  red\ *) red+=("#$n $ref: ${verdict#red }"); continue ;;
233
239
  rerun\ *)
234
240
  for id in ${verdict#rerun }; do
235
- code="$(gh_write -o /dev/null -w '%{http_code}' -X POST "$api/actions/runs/$id/rerun")"
241
+ code="$(gh_actions -o /dev/null -w '%{http_code}' -X POST "$api/actions/runs/$id/rerun")"
236
242
  echo "#$n $ref: a gating tier (run $id) was cancelled; re-running it (HTTP $code)"
237
243
  done
238
244
  continue ;;
@@ -256,7 +262,7 @@ jobs:
256
262
  elif jq -e --arg m "$marker" 'any(.[]; .body | contains($m))' >/dev/null <<<"$comments"; then
257
263
  red+=("#$n $ref: still does not merge cleanly with main after $wf rebuilt it")
258
264
  else
259
- code="$(gh_write -o /dev/null -w '%{http_code}' -X POST "$api/actions/workflows/$wf/dispatches" -d '{"ref":"main"}')"
265
+ code="$(gh_actions -o /dev/null -w '%{http_code}' -X POST "$api/actions/workflows/$wf/dispatches" -d '{"ref":"main"}')"
260
266
  if [ "$code" = "204" ]; then
261
267
  body="$marker -- it conflicted with main (another bot landed first), so $wf was re-run to rebuild it from today's main. If the rebuilt branch conflicts too, this PR is reported for a human."
262
268
  gh_write -o /dev/null -X POST "$api/issues/$n/comments" -d "$(jq -nc --arg b "$body" '{body:$b}')" || true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@norskvideo/ctl-dev-kit",
3
- "version": "0.2.61",
3
+ "version": "0.2.63",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./create-product": "./create-product/create-product.ts",
@@ -39,9 +39,9 @@
39
39
  "devDependencies": {
40
40
  "@norskvideo/ctl-oas-to-ts": "^0.1.0",
41
41
  "@norskvideo/norsk-sdk": "1.3.1-2026-10-08-846f25e3",
42
- "@norskvideo/norsk-studio": "1.30.0-2026-10-08-8f4b6c11",
43
- "@norskvideo/norsk-studio-builder": "1.30.0-2026-10-08-8f4b6c11",
44
- "@norskvideo/norsk-studio-built-ins": "1.30.0-2026-10-08-8f4b6c11",
42
+ "@norskvideo/norsk-studio": "1.30.0-2026-10-09-0cd6f070",
43
+ "@norskvideo/norsk-studio-builder": "1.30.0-2026-10-09-0cd6f070",
44
+ "@norskvideo/norsk-studio-built-ins": "1.30.0-2026-10-09-0cd6f070",
45
45
  "@playwright/test": "^1.59.0",
46
46
  "@types/bun": "latest",
47
47
  "@types/cors": "^2.8.17",