mirror of
https://github.com/ditkrg/todo-to-issue-action.git
synced 2026-01-25 15:22:59 +00:00
Merge pull request #107 from mikesnoeren/master
Add Twig language support
This commit is contained in:
@@ -37,7 +37,7 @@ Create a `workflow.yml` file in your `.github/workflows` directory like:
|
|||||||
steps:
|
steps:
|
||||||
- uses: "actions/checkout@master"
|
- uses: "actions/checkout@master"
|
||||||
- name: "TODO to Issue"
|
- name: "TODO to Issue"
|
||||||
uses: "alstr/todo-to-issue-action@v4.6"
|
uses: "alstr/todo-to-issue-action@v4.6.1"
|
||||||
id: "todo"
|
id: "todo"
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -100,6 +100,7 @@ There are additional inputs if you want to be able to assign issues to projects.
|
|||||||
* Swift
|
* Swift
|
||||||
* TeX
|
* TeX
|
||||||
* TSX
|
* TSX
|
||||||
|
* Twig
|
||||||
* TypeScript
|
* TypeScript
|
||||||
* Vue
|
* Vue
|
||||||
* YAML
|
* YAML
|
||||||
|
|||||||
12
syntax.json
12
syntax.json
@@ -579,5 +579,17 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"language": "Twig",
|
||||||
|
"markers" : [
|
||||||
|
{
|
||||||
|
"type": "block",
|
||||||
|
"pattern": {
|
||||||
|
"start": "{#",
|
||||||
|
"end": "#}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -200,3 +200,14 @@ index 525e25d..ba4e68d 100644
|
|||||||
- text-align: center;
|
- text-align: center;
|
||||||
- }
|
- }
|
||||||
-}
|
-}
|
||||||
|
diff --git a/tests/example_file.twig b/src/tests/example_file.twig
|
||||||
|
index 525e25d..ba4e68d 100644
|
||||||
|
--- a/src/tests/example_file.twig
|
||||||
|
+++ b/src/tests/example_file.twig
|
||||||
|
@@ -1,6 +0,0 @@
|
||||||
|
- {# TODO: Hopefully this comment turns into a todo issue #}
|
||||||
|
- {#
|
||||||
|
- TODO:Multiline comments
|
||||||
|
- also need to be turned into todos, and hopefully
|
||||||
|
- kept together as one todo
|
||||||
|
- #}
|
||||||
@@ -208,3 +208,15 @@ index 0000000..7cccc5b
|
|||||||
+ text-align: center;
|
+ text-align: center;
|
||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
|
diff --git a/tests/example_file.twig b/src/tests/example_file.twig
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..7cccc5b
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/src/tests/example_file.twig
|
||||||
|
@@ -0,0 +1,6 @@
|
||||||
|
+ {# TODO: Hopefully this comment turns into a todo issue #}
|
||||||
|
+ {#
|
||||||
|
+ TODO:Multiline comments
|
||||||
|
+ also need to be turned into todos, and hopefully
|
||||||
|
+ kept together as one todo
|
||||||
|
+ #}
|
||||||
|
|||||||
@@ -60,6 +60,9 @@ class NewIssueTests(unittest.TestCase):
|
|||||||
def test_scss_issues(self):
|
def test_scss_issues(self):
|
||||||
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'scss'), 2)
|
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'scss'), 2)
|
||||||
|
|
||||||
|
def test_twig_issues(self):
|
||||||
|
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'twig'), 2)
|
||||||
|
|
||||||
|
|
||||||
class ClosedIssueTests(unittest.TestCase):
|
class ClosedIssueTests(unittest.TestCase):
|
||||||
# Check for removed TODOs across the files specified.
|
# Check for removed TODOs across the files specified.
|
||||||
@@ -109,6 +112,9 @@ class ClosedIssueTests(unittest.TestCase):
|
|||||||
def test_scss_issues(self):
|
def test_scss_issues(self):
|
||||||
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'scss'), 2)
|
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'scss'), 2)
|
||||||
|
|
||||||
|
def test_twig_issues(self):
|
||||||
|
self.assertEqual(count_issues_for_file_type(self.raw_issues, 'twig'), 2)
|
||||||
|
|
||||||
|
|
||||||
class IgnorePatternTests(unittest.TestCase):
|
class IgnorePatternTests(unittest.TestCase):
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user