-
-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Toggle pull-request draft status #485
Conversation
Codecov Report
@@ Coverage Diff @@
## main #485 +/- ##
==========================================
- Coverage 92.30% 87.90% -4.41%
==========================================
Files 6 6
Lines 117 124 +7
Branches 18 22 +4
==========================================
+ Hits 108 109 +1
- Misses 9 15 +6
Continue to review full report at Codecov.
|
Got errors: Current workflow file: Current label commenter file: Test PR: |
Thank you for the super quick try! Please use |
Yes. I totally agree with you. We have no way to avoid that behavior with a pat. I think |
You're welcome. (Comment with anything I missed to mention or explain) |
Good! |
This will be merged and released as the v1.11.0 with other new features. Watch v2.0.0 Milestone. We can continue to use |
Close #436
Overview
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 errorResource not accessible by integration
with the GitHub API v4 andGITHUB_TOKEN
. This problem may be related to the following thread.This pull-request uses a personal access token with a
public_repo
scope (for a public repository) as a workaround.References
Test This Implementation
Workflow
Provide a personal access token with a
public_repo
scope (for a public repository) as theGH_PAT
secret.Label Commenter Config
Add
draft: true
ordraft: false
to apr
field.