magit-todos icon indicating copy to clipboard operation
magit-todos copied to clipboard

Create issues from TODOs via magit-forge

Open jefftrull opened this issue 3 years ago • 5 comments

VSCode has a compelling feature that magit-todos + magit-forge almost provides: the ability to create Github issues directly from TODO comments. It would be cool to have this :)

See package description https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-pull-request-github and related tweet (with video) by Paige Bailey https://twitter.com/DynamicWebPaige/status/1377021900489113606

jefftrull avatar Apr 21 '21 22:04 jefftrull

"Enhancement" and low priority, obviously :)

jefftrull avatar Apr 21 '21 22:04 jefftrull

Yeah, that'd be a really cool feature. I haven't looked at Forge's code in a long time. Would it be as simple as a single function call with a string argument?

alphapapa avatar Jun 03 '21 22:06 alphapapa

It looks as though the exact API we need here is not provided - help from @tarsius is probably required - but I think one could put the contents of forge-create-issue into the shell of magit-todos-jump-to-item and it would work (though not be stable).

jefftrull avatar Jun 03 '21 22:06 jefftrull

After calling forge-create-issue you can just insert text into the buffer that it displayed, which you should be able to do by creating a wrapper around that function and then your code. Of course there are complications -- the buffer may already contain other text for various reasons and you will have to decide what to do about that. There's really not much else I can say at this point.

tarsius avatar Jun 09 '21 19:06 tarsius

Thanks, Jonas. Sounds like it should be pretty simple.

This would be nice to have, but it isn't a feature I plan to work on anytime soon, so marking as help-wanted.

alphapapa avatar Jun 09 '21 20:06 alphapapa