Skip to content

fix(bitacora): drive Projects v2 via github-script (gh project → unknown owner type)#289

Merged
mlorentedev merged 2 commits into
mainfrom
bitacora-status-graphql-fix
Jun 7, 2026
Merged

fix(bitacora): drive Projects v2 via github-script (gh project → unknown owner type)#289
mlorentedev merged 2 commits into
mainfrom
bitacora-status-graphql-fix

Conversation

@mlorentedev
Copy link
Copy Markdown
Owner

Problem

bitacora-status.yml (HARNESS-010, #286) failed at runtime on the first real assignment: gh project item-add --owner mlorentedev errors with unknown owner type. The gh project CLI cannot resolve the owner under the fine-grained BITACORA_PAT, even though that PAT has project write (the add-to-project action works because it uses raw GraphQL, not gh project).

A live end-to-end test (assigning a throwaway issue) surfaced this — CI was green because the failure only happens at runtime with the real secret.

Fix

Rewrite the status step with actions/github-script@v9, calling the Projects v2 GraphQL directly:

  • addProjectV2ItemById (idempotent — returns the existing item id) keyed off context.payload.issue.node_id;
  • updateProjectV2ItemFieldValue to set Status = In Progress.

No gh project, no shell-quoting of GraphQL, no lint suppressions. Runbook §7b template updated to match.

Verification

  • actionlint → exit 0; YAML valid; spec-gate → OK (36 LOC, under threshold).
  • The exact two mutations were run against the live board before shipping (added + flipped a real issue to In Progress, idempotent re-add confirmed).
  • Post-merge: a fresh assign-a-throwaway-issue test will confirm the deployed workflow goes green and flips the field.

Follow-up to #286 (HARNESS-010).

…own owner type)

The bitacora-status workflow failed at runtime with "unknown owner type":
`gh project --owner` cannot resolve the owner under the fine-grained
BITACORA_PAT. Rewrite the status step with actions/github-script, calling the
Projects v2 GraphQL mutations directly (addProjectV2ItemById +
updateProjectV2ItemFieldValue) keyed off the issue node_id.

Validated against the live board before shipping. Runbook §7b updated to match.
@mlorentedev mlorentedev force-pushed the bitacora-status-graphql-fix branch from 265b20c to d65b5be Compare June 7, 2026 02:40
@mlorentedev mlorentedev merged commit d1ac1fc into main Jun 7, 2026
6 checks passed
@mlorentedev mlorentedev deleted the bitacora-status-graphql-fix branch June 7, 2026 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant