todo-to-issue-action icon indicating copy to clipboard operation
todo-to-issue-action copied to clipboard

Parameterize identifiers in config file?

Open kkapper opened this issue 3 years ago • 3 comments

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?

kkapper avatar Jun 18 '21 17:06 kkapper

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.

alstr avatar Jun 19 '21 07:06 alstr

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

In my codebases, usually you would find

  • FIX, FIXME to indicate that something is breaking or would break if used in a specific way or in any way, which I'd like to have it labeled as bug.
  • ENH to donate that something is working but it can be enhanced, which I'd like to have it labeled as enhancement.
  • TODO to either donate general task or to implement something new, which I'd like to have it labeled as feature.

Custom identifiers + custom labels would be awesome

kkharji avatar Mar 12 '22 00:03 kkharji

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

alstr avatar Mar 14 '22 16:03 alstr

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 avatar Aug 23 '22 13:08 alstr

Now live in v4.7. 😄

alstr avatar Aug 26 '22 12:08 alstr