convert issue to pull request
See original GitHub issueby creating a PR with the API using {"issue": <issuenumber>}
you can convert that issue into a PR
Here’s an example of this undocumented API feature in use by Hub:
https://github.com/github/hub/blob/7b02a665ddacd885ad017a7c6904e662c8417bf8/commands/pull_request.go#L53-L59 https://github.com/github/hub/blob/7b02a665ddacd885ad017a7c6904e662c8417bf8/commands/pull_request.go#L350-L353
Example URL:
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Linking a pull request to an issue - GitHub Docs
On GitHub.com, navigate to the main page of the repository. Under your repository name, click Issues.
Read more >Converting Github issues into pull requests - David Winterbottom
Using the Hub library, it's possible to convert Github issues into pull requests. This gives rise to a useful Github workflow which this ......
Read more >Convert Github pull-request to issue - Stack Overflow
You can't convert the pull-request back to an issue. The conversion to a pull-request is done by hub with the github api.
Read more >Convert a GitHub Issue Into a Pull Request - Brandon Keepers
A little-known-feature of the GitHub API is the ability to attach changes to an issue, converting it into a pull request.
Read more >How to open a pull request - Axolo
When the code is ready to be reviewed, the developer can convert its draft pull request to ready for review, or open the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think it’s undocumented
Honestly it’s not a workflow I’d like to highlight on the web. It may sound good on private projects but sometimes an issue ends up with many PRs. The current “PR fixes Issue” standard is preferable on most projects.
If you need this feature, I’d suggest creating a separate extension so only those who need it have it.
From what I understand, you call the “update issue” API¹ and provide all the parameters you’d send to the “create PR” API ²
¹ https://github.com/github/hub/blob/7b02a665ddacd885ad017a7c6904e662c8417bf8/github/client.go#L778 ² https://github.com/github/hub/blob/7b02a665ddacd885ad017a7c6904e662c8417bf8/commands/pull_request.go#L335-L353