能否通过GitHub App创建Project V2?权限问题求助
问题:GitHub App调用GraphQL API创建Project V2时返回FORBIDDEN错误
背景
- 经典项目已被弃用,仓库未关联项目时无法创建经典项目,目前有临时解决方法但可能很快被移除
- 找不到官方相关的有效文档、帖子或讨论,求相关资源
问题详情
使用专门创建的、开启全部权限的GitHub App调用GitHub GraphQL API(请求地址api.github.com/graphql,携带Content-Type和Authorization请求头)执行创建Project V2的mutation时,API返回如下错误:
type: "FORBIDDEN"
message: "Resource not accessible by integration"
请求使用的mutation代码:
mutation { createProjectV2( input: {title: "V2 project related to test repo created by a bot", ownerId: "MY_USER_ID", clientMutationId: ""} ) { __typename projectV2 { creator { login resourcePath ... on Bot { id login } } ...ProjectV2Fragment } clientMutationId } } fragment ProjectV2Fragment on ProjectV2 { title id creator { login __typename resourcePath } }
- 使用个人经典访问令牌认证可正常创建Project V2,但GitHub App认证无法完成操作
- 已确认该GitHub App认证有效,因为它能在创建它的组织内正常创建项目
求助
请问有什么解决思路?
内容的提问来源于stack exchange,提问作者Figares
相关产品推荐
相关产品推荐

