feat: require workflow labels for issues (Closes #513)
This commit is contained in:
@@ -11,6 +11,7 @@ from unittest.mock import MagicMock, call, patch
|
||||
|
||||
sys.path.insert(0, str(__import__("pathlib").Path(__file__).resolve().parent.parent))
|
||||
import manage_labels # noqa: E402
|
||||
import issue_workflow_labels # noqa: E402
|
||||
|
||||
|
||||
FAKE_AUTH = "Basic dGVzdDp0ZXN0" # base64("test:test")
|
||||
@@ -129,6 +130,11 @@ class TestConstants(unittest.TestCase):
|
||||
names = [l["name"] for l in manage_labels.LABELS]
|
||||
self.assertIn("status:in-progress", names)
|
||||
|
||||
def test_canonical_workflow_labels_are_defined(self):
|
||||
names = {l["name"] for l in manage_labels.LABELS}
|
||||
for spec in issue_workflow_labels.CANONICAL_LABEL_SPECS:
|
||||
self.assertIn(spec.name, names)
|
||||
|
||||
def test_all_mapped_labels_are_defined(self):
|
||||
defined = {l["name"] for l in manage_labels.LABELS}
|
||||
for issue, names in manage_labels.MAPPING.items():
|
||||
|
||||
Reference in New Issue
Block a user