You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(workflow): assign Copilot via GraphQL replaceActorsForAssignable (#19)
The previous Sync from Docs workflow has been failing with HTTP 422 since
it tried to create issues with two invalid REST fields:
- agent_assignment: {...} (not a valid Issues API field)
- assignees: ["copilot-swe-agent[bot]"] (not a valid assignee login)
This rewrites the issue-creation step to:
1. Create a plain issue (title/body/labels only)
2. Look up the Copilot bot id via GraphQL suggestedActors
3. Assign Copilot via GraphQL replaceActorsForAssignable
ADMIN_GITHUB_TOKEN must belong to a user with a Copilot seat for the
assignment to succeed.
Copy file name to clipboardExpand all lines: .github/workflows/sync-from-docs.yml
+29-20Lines changed: 29 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -73,28 +73,37 @@ jobs:
73
73
--arg services "$CHANGED_SERVICES" \
74
74
'"The upstream Docs have been updated. Ensure the affected CLI tools in this monorepo are in sync.\n\n## Changed Services\n\n`" + $services + "`\n\n## Recent Docs Changes\n\n```\n" + $changes + "\n```\n\n## Instructions\n\nThis is a monorepo with CLI tools in subdirectories (luma/, suno/, sora/, etc.).\n\nCheck the AceDataCloud/Docs repo OpenAPI specs at `openapi/<service>.json` for each changed service.\n\nCompare models, endpoints, and parameters against the corresponding subdirectory'\''s code. Fix any differences.\n\nOnly modify subdirectories matching the changed services. If everything is already in sync, close this issue."')
75
75
76
-
ISSUE_NUM=$(jq -n \
76
+
ISSUE_JSON=$(jq -n \
77
77
--arg title "sync: update from Docs ($COMMIT_INFO)" \
78
78
--argjson body "$body" \
79
-
--arg repo "$REPO" \
80
-
'{
81
-
title: $title,
82
-
body: $body,
83
-
labels: ["auto-sync"],
84
-
assignees: ["copilot-swe-agent[bot]"],
85
-
agent_assignment: {
86
-
target_repo: $repo,
87
-
base_branch: "main",
88
-
custom_instructions: "Check out the AceDataCloud/Docs repo and read the openapi/ specs. This is a monorepo — each subdirectory (luma/, suno/, etc.) is a CLI tool. Compare commands and parameters against the Docs specs. Fix any differences. If everything is already in sync, close this issue."
0 commit comments