alstr / todo-to-issue-action

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

Parameterize identifiers in config file? #49

Closed kkapper closed 2 years ago

kkapper commented 3 years ago

https://github.com/alstr/todo-to-issue-action/blob/ade69c5806026ba676eedb1ba3dea412db329f41/main.py#L265-L267

Was wondering if anyone is working on this?
How useful is this to anyone else using this action?

alstr commented 3 years ago

I have thought about this and it is on a list of things to maybe look at in future.

I've not added it yet because TODO seems to be standard by quite a wide margin, though I'm sure there are others that may be useful, like FIXME.

It could also be used to restrict the todos handled by the action, with it ignoring others that use a different identifier.

kkharji commented 2 years ago

It would be cool to have it as a dictionary, with identifiers mapping to issue labels.

In my codebases, usually you would find

Custom identifiers + custom labels would be awesome

alstr commented 2 years ago

Those are great suggestions! Will try and have a look when I can but as always PRs are welcome.

alstr commented 2 years ago

I've just pushed a commit for this functionality. I've not created an actual release for it yet but will do soon.

Example usage (add to workflow.yml):

IDENTIFIERS: '[{"name": "TODO", "labels": ["help wanted"]}, {"name": "FIXME", "labels": ["bug"]}]'

Must be valid JSON with double quoted keys/values.

If you don't want to define default labels, you can just set labels to an empty list.

alstr commented 2 years ago

Now live in v4.7. 😄