diff --git a/.gitignore b/.gitignore index 512caa4..45e53da 100644 --- a/.gitignore +++ b/.gitignore @@ -87,7 +87,7 @@ ipython_config.py # pyenv # For a library or package, you might want to ignore these files since the code is # intended to run in multiple environments; otherwise, check them in: -# .python-version +.python-version # pipenv # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. diff --git a/README.md b/README.md index d3bbcdc..4240d3b 100644 --- a/README.md +++ b/README.md @@ -178,6 +178,7 @@ Only a single milestone can be specified. If the milestone does not exist, it wi - Starlark - Swift - TeX +- TOML - TSX - Twig - TypeScript diff --git a/syntax.json b/syntax.json index a4a7f95..46726e9 100644 --- a/syntax.json +++ b/syntax.json @@ -40,6 +40,15 @@ } ] }, + { + "language": "TOML", + "markers": [ + { + "type": "line", + "pattern": "#" + } + ] + }, { "language": "Ruby", "markers": [ diff --git a/tests/test_closed.diff b/tests/test_closed.diff index e1104a1..c8b379c 100644 --- a/tests/test_closed.diff +++ b/tests/test_closed.diff @@ -117,6 +117,18 @@ index 6397789..494d42f 100644 -# TODO: Define inputs -# Need to do this before the action is released -# labels: urgent +diff --git a/tests/example_file.toml b/tests/example_file.toml +index 6397789..494d42f 100644 +--- a/tests/example_file.toml ++++ b/tests/example_file.toml +@@ -1,7 +1,3 @@ + name = "TODO to Issue" +-# TODO: Write a more interesting description + description = "Converts IDE TODO comments to GitHub issues" + author = "Alastair Mooney" +-# TODO: Define inputs +-# Need to do this before the action is released +-# labels: urgent diff --git a/tests/example_file.prog.abap b/tests/example_file.prog.abap index 6397789..494d42f 100644 --- /dev/null diff --git a/tests/test_new.diff b/tests/test_new.diff index d50bd0a..8298cdb 100644 --- a/tests/test_new.diff +++ b/tests/test_new.diff @@ -143,6 +143,19 @@ index 0000000..6397789 +# TODO: Define inputs +# Need to do this before the action is released +# labels: urgent +diff --git a/tests/example_file.toml b/tests/example_file.toml +new file mode 100644 +index 0000000..6397789 +--- /dev/null ++++ b/tests/example_file.toml +@@ -0,0 +1,7 @@ ++name = "TODO to Issue" ++# TODO: Write a more interesting description ++description = "Converts IDE TODO comments to GitHub issues" ++author = "Alastair Mooney" ++# TODO: Define inputs ++# Need to do this before the action is released ++# labels: urgent diff --git a/tests/example_file.prog.abap b/src/tests/example_file.prog.abap new file mode 100644 index 0000000..7cccc5b diff --git a/tests/test_todo_parser.py b/tests/test_todo_parser.py index a7a87ff..bf3d5a8 100644 --- a/tests/test_todo_parser.py +++ b/tests/test_todo_parser.py @@ -29,6 +29,9 @@ class NewIssueTest(unittest.TestCase): def test_yaml_issues(self): self.assertEqual(count_issues_for_file_type(self.raw_issues, 'yaml'), 2) + def test_toml_issues(self): + self.assertEqual(count_issues_for_file_type(self.raw_issues, 'toml'), 2) + def test_php_issues(self): self.assertEqual(count_issues_for_file_type(self.raw_issues, 'php'), 4) @@ -120,6 +123,9 @@ class ClosedIssueTest(unittest.TestCase): def test_yaml_issues(self): self.assertEqual(count_issues_for_file_type(self.raw_issues, 'yaml'), 2) + def test_toml_issues(self): + self.assertEqual(count_issues_for_file_type(self.raw_issues, 'toml'), 2) + def test_php_issues(self): self.assertEqual(count_issues_for_file_type(self.raw_issues, 'php'), 4)