Merge pull request #214 from aleexharris/feat/add-toml-support

Added TOML Support
This commit is contained in:
Alastair Mooney 2024-10-14 12:33:02 +01:00 committed by GitHub
commit 771af35191
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 42 additions and 1 deletions

2
.gitignore vendored
View File

@ -87,7 +87,7 @@ ipython_config.py
# pyenv # pyenv
# For a library or package, you might want to ignore these files since the code is # 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: # intended to run in multiple environments; otherwise, check them in:
# .python-version .python-version
# pipenv # pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.

View File

@ -178,6 +178,7 @@ Only a single milestone can be specified. If the milestone does not exist, it wi
- Starlark - Starlark
- Swift - Swift
- TeX - TeX
- TOML
- TSX - TSX
- Twig - Twig
- TypeScript - TypeScript

View File

@ -40,6 +40,15 @@
} }
] ]
}, },
{
"language": "TOML",
"markers": [
{
"type": "line",
"pattern": "#"
}
]
},
{ {
"language": "Ruby", "language": "Ruby",
"markers": [ "markers": [

View File

@ -117,6 +117,18 @@ index 6397789..494d42f 100644
-# TODO: Define inputs -# TODO: Define inputs
-# Need to do this before the action is released -# Need to do this before the action is released
-# labels: urgent -# 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 diff --git a/tests/example_file.prog.abap b/tests/example_file.prog.abap
index 6397789..494d42f 100644 index 6397789..494d42f 100644
--- /dev/null --- /dev/null

View File

@ -143,6 +143,19 @@ index 0000000..6397789
+# TODO: Define inputs +# TODO: Define inputs
+# Need to do this before the action is released +# Need to do this before the action is released
+# labels: urgent +# 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 diff --git a/tests/example_file.prog.abap b/src/tests/example_file.prog.abap
new file mode 100644 new file mode 100644
index 0000000..7cccc5b index 0000000..7cccc5b

View File

@ -29,6 +29,9 @@ class NewIssueTest(unittest.TestCase):
def test_yaml_issues(self): def test_yaml_issues(self):
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'yaml'), 2) 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): def test_php_issues(self):
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'php'), 4) 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): def test_yaml_issues(self):
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'yaml'), 2) 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): def test_php_issues(self):
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'php'), 4) self.assertEqual(count_issues_for_file_type(self.raw_issues, 'php'), 4)