alstr / todo-to-issue-action

Action that converts TODO comments to GitHub issues on push.
MIT License
600 stars 114 forks source link

Handle comment delimiters not on same line as 'todo' keyword #119

Open klein0r opened 2 years ago

klein0r commented 2 years ago

Comments are defined like this:

..
    _This: is a comment!

..
    [and] this!

..
    this:: too!

..
    |even| this:: !

Additionally, support for https://www.sphinx-doc.org/en/master/usage/extensions/todo.html would be awesome

.. todo::
     This is a todo
alstr commented 2 years ago

Interesting, thanks for the suggestion! It would definitely be good to add this; PR requests are always welcome for new languages, and they're relatively easy to do. This does look a little more complicated than the standard comment syntax. For one, at the moment if the comment delimiter is not on the same line as the 'todo' keyword/title, it won't get picked up, but that is something I am hoping to improve.

alstr commented 2 years ago

I've done some experimentation and the challenges to adding this at the moment are:

The second one is an easy fix; the third is a bit more involved.

silopolis commented 1 year ago

We'd surely be a bunch to welcome this addition! Thanks for taking care of it :)

alstr commented 1 month ago

The next version should support this style:

.. todo:: This is my issue title.

However, the below presents challenges I can't accommodate yet:

.. todo::

   This is another issue title and it
   breaks across multiple lines.

Mainly because the action doesn't associate those two lines as comments. This is something fundamental to how the action works, so no easy workaround currently.