GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • community
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles

This view

  • Original page
  • New address

GeezerVison is showing github.com — Permission to use GraphQL API with GITHUB_TOKEN on GitHub Actions · community · Discussion #5082

@community GitHub Community

Permission to use GraphQL API with GITHUB_TOKEN on GitHub Actions #5082

Unanswered
peaceiris asked this question in Actions
Permission to use GraphQL API with GITHUB_TOKEN on GitHub Actions #5082
@peaceiris peaceiris
Aug 13, 2021 · 1 comment
Return to top
Discussion options
  • Uh oh!

    There was an error while loading. Please reload this page.

peaceiris
Aug 13, 2021

My proposal about a REST API to toggle pull-request draft status (pulls.update: Change pull-request draft status · Issue #69 · octokit/rest.js) has been rejected since the GitHub API v4 (GraphQL API) has the ability to do that.

Unfortunately, an auto-generated access token called GITHUB_TOKEN seems not to have full control permission of the GraphQL API. We got the error Resource not accessible by integration with the GitHub API v4 and GITHUB_TOKEN.

This pull-request uses a personal access token with a public_repo scope (for a public repository) as a workaround.

Related:

  • feat: Toggle pull-request draft status peaceiris/actions-label-commenter#485
  • feat: Support discussion event peaceiris/actions-label-commenter#487
  • Personal access token with a repository scope #5081
You must be logged in to vote
All reactions

Replies: 1 comment

Comment options
  • Uh oh!

    There was an error while loading. Please reload this page.

Andre601
Aug 24, 2021

Hopping in to say that this is quite annoying.

Members with manage issue/PR rights can to my knowledge change a PRs status from/to draft and the standard Github token should grant similar privileges since closing and/or locking are available through it too.

While using your own access token with sufficient rights is a working workaround does it come with the severe downside of using your personal account (or whichever was used to generate the token) for the action, which is something I and probably many others do not want for reasons such as security.
There is really no reason for the GitHub token to not also have rights to change a PRs draft status and I honestly see this as a possible bug even, so a fix for this would be really nice to have.

You must be logged in to vote
All reactions
  • 👍 2
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🚢
Actions
Labels
Actions Build, test, and automate your deployment pipeline with world-class CI/CD Product Feedback Share your thoughts and suggestions on GitHub features and improvements
2 participants
@peaceiris @Andre601
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.