fix(bitacora): drive Projects v2 via github-script (gh project → unknown owner type)#289
Merged
Merged
Conversation
…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.
265b20c to
d65b5be
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
bitacora-status.yml(HARNESS-010, #286) failed at runtime on the first real assignment:gh project item-add --owner mlorentedeverrors withunknown owner type. Thegh projectCLI cannot resolve the owner under the fine-grainedBITACORA_PAT, even though that PAT has project write (theadd-to-projectaction works because it uses raw GraphQL, notgh 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 offcontext.payload.issue.node_id;updateProjectV2ItemFieldValueto setStatus = 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).Follow-up to #286 (HARNESS-010).