Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue should be created based on first identifier encountered #235

Open
rgalonso opened this issue Nov 11, 2024 · 3 comments
Open

issue should be created based on first identifier encountered #235

rgalonso opened this issue Nov 11, 2024 · 3 comments

Comments

@rgalonso
Copy link
Contributor

If the IDENTIFIERS input is specified, this can lead to unexpected results if a comment line includes multiple identifiers. For instance, consider the following IDENTIFIERS value:

[
    {"name": "FIX", "labels": []},
    {"name": "TODO", "labels": []}
]

If there's a comment such as this

# TODO: Fix this

then the first identifier in the dictionary, not the on the source line will be matched.

The expected result from the above should be that an issue with title Fix this is created. However, because FIX is matched first, the title is this.

@rgalonso
Copy link
Contributor Author

@alstr, I do NOT have a solution for this one yet. I only just discovered this morning while writing a test to capture #234. My next PR will include a test which captures this though. (The test is marked as an expected failure for now.)

rgalonso added a commit to rgalonso/todo-to-issue-action that referenced this issue Nov 12, 2024
These tests capture the existing issues alstr#234 and
issue alstr#235. As no solution is in place yet, they're
marked as expected failures.
@alstr
Copy link
Owner

alstr commented Nov 22, 2024

Assuming this one is still open with #234.

@rgalonso
Copy link
Contributor Author

Assuming this one is still open with #234.

Correct. I've only encountered this once so far in my private repos, so I haven't felt any urgency to try to fix it. It's probably not a difficult change, but I haven't investigated it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants