alstr / todo-to-issue-action

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

Is there a way to limit the lines of code shown in issues created via GitHub Actions? #197

Closed Wizely99 closed 3 weeks ago

Wizely99 commented 4 weeks ago

Sometimes, the entire file appears in the issue description. It would be helpful if the issue preview could be restricted to only include the function where the TODO is declared or at least a few lines.

alstr commented 3 weeks ago

You can use the ISSUE_TEMPLATE parameter in the workflow file.

This is briefly mentioned in the README; I'm sure there was more detail about it previously, so not sure why/when it was removed. Probably should update this.

Anyway, this is a string where you can insert the {{ title }}, {{ body }}, {{ url }} and {{ snippet }} placeholders together with any \n linebreaks and other text to create a basic customised format.

Wizely99 commented 3 weeks ago

@alstr Thank you it worked by removing the {{ snippet }} from the template.

...
 with:
          ISSUE_TEMPLATE: "{{ title }}\n{{ body }}\n{{ url }}"
alstr commented 3 weeks ago

Thanks, I've updated the README to include this.