todo-to-issue-action
todo-to-issue-action copied to clipboard
Action ran fine, but didn't pick TSX comments?
So, .tsx
extension is listed in the languages.yml file, this is my TODO comment:
{/*
@TODO complete the FAQs
labels: 100 USDT
*/}
I already added the IDENTIFIERS
prop the workflow file:
name: "Run TODO to Issue"
on: ["push"]
jobs:
build:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v3"
- name: "TODO to Issue"
uses: "alstr/todo-to-issue-action@v4"
with:
IDENTIFIERS: '[{"name": "@TODO", "labels": ["help wanted"]}]'
Didn't pick the @TODO
comment after pushing the file, but the action ran without errors.
Does the comment is formatted incorrectly?
Hey, thanks for the feedback.
I haven't much experience with TSX myself, and we're missing a test for this extension, but my initial impression is that the opening {
and closing }
may be confusing things, as in syntax.json
a comment is defined as \* ... *\
and it has to appear at the start of a line; at the moment that's not the case. Is that something you can test?
Hey, I have some issue with TSX comment too,
A comment is { /* ..... */ } i can provide some test if needed
Looks like we need to update syntax.json
as at the moment I don't think it's looking for that. I'll try and look next time I get chance.
To be more specific a comment can be
// /* */ {/* */} { /* */ }
This could be a hard issue, though, because we cannot just say that we allow any character before a TODO comment since when the programmer writes "//TODO" into a string, then the string would also match in an unexpected behavior. I also thought about a better solution because sometimes you write a comment behind code what is also currently not matched:
// TODO This is being matched
function foo(): string {
let bar: string = "// TODO A TODO in a string";
return bar; // TODO This don't match but should match
}
I try to make something up, but I'm open to ideas.
Hopefully will add support for end of line comments soon, if possible (#190).
If someone wants to submit a PR to include the other TSX comment patterns I'll be happy to merge it.