Skip to content

ci: use HAYSTACK_BOT_TOKEN for CLA draft gate#12044

Merged
julian-risch merged 1 commit into
mainfrom
ci/cla-gate-bot-token
Jul 17, 2026
Merged

ci: use HAYSTACK_BOT_TOKEN for CLA draft gate#12044
julian-risch merged 1 commit into
mainfrom
ci/cla-gate-bot-token

Conversation

@julian-risch

Copy link
Copy Markdown
Member

Related Issues

Proposed Changes:

The CLA draft gate on #12036 correctly posted the comment, removed the reviewer, and added the cla-pending label — but the PR was never converted to draft. The workflow run logs show why:

##[warning]PR #12036: Request failed due to following response errors:
 - Resource not accessible by integration

The convertPullRequestToDraft / markPullRequestReadyForReview GraphQL mutations require a user token; GitHub App installation tokens like GITHUB_TOKEN cannot call them, regardless of the granted pull-requests: write permission. This switches the workflow to secrets.HAYSTACK_BOT_TOKEN (already used by release.yml and update-platform-components.yml), with no silent fallback to GITHUB_TOKEN so a missing secret fails loudly instead of half-gating PRs again.

Side effects, both intentional:

  • Gate/restore actions (comments, labels, draft toggles, review requests) now show as the bot account instead of github-actions[bot].
  • Because PAT-initiated events trigger workflows (unlike GITHUB_TOKEN events), the ready_for_review/review_requested events emitted by restore() now correctly trigger the linked_issue_review workflow after a contributor signs the CLA.

How did you test it?

  • Root cause confirmed from the cla_draft_gate run logs (runs 29559061351, 29542596075) and the state of fix: warm child Toolset before flattening in Toolset.add() #12036 (labeled + commented but not drafted).
  • actionlint via pre-commit passed. The mutation itself can only be verified once this is on main, on the next PR the sweep gates.

Notes for the reviewer

  • Requires HAYSTACK_BOT_TOKEN to be a classic PAT with repo scope (it creates branches/PRs in release.yml, so it should be).

Checklist

🤖 Generated with Claude Code

GITHUB_TOKEN cannot execute the convertPullRequestToDraft /
markPullRequestReadyForReview GraphQL mutations (fails with "Resource
not accessible by integration", seen on #12036: the PR got the comment,
label, and reviewer removal, but was never converted to draft). These
mutations require a user token, so use the existing bot PAT.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@julian-risch
julian-risch requested a review from a team as a code owner July 17, 2026 07:12
@julian-risch
julian-risch requested review from anakin87 and removed request for a team July 17, 2026 07:12
@vercel

vercel Bot commented Jul 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
haystack-docs Ignored Ignored Jul 17, 2026 7:12am

Request Review

@julian-risch
julian-risch merged commit b67079a into main Jul 17, 2026
24 checks passed
@julian-risch
julian-risch deleted the ci/cla-gate-bot-token branch July 17, 2026 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants