Skip to content

Commit 9624f1f

Browse files
committed
ci url output had trailing spaces, which fails yaml linting
Jira: IAM-950
1 parent 92fabe5 commit 9624f1f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tools/lint-apps

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#
55
# Adapted from mozilla-iam/iam to run in CI.
66
import os
7+
import re
78
from typing import Any
89

910
from auth0.authentication import GetToken # type: ignore
@@ -24,10 +25,15 @@ def apps_from_yml(filename) -> Any:
2425
return yaml.load(handle)
2526

2627

28+
def no_trailing_spaces_for_urls(line: str) -> str:
29+
"""We'll fail pre-commit's yaml linting otherwise."""
30+
return line.replace(" url: \n", " url:\n")
31+
32+
2733
def apps_to_yml(apps: Any) -> None:
2834
yaml = YAML(typ="rt")
2935
with open(APPS_NEW_YML, "w") as handle:
30-
yaml.dump(apps, handle)
36+
yaml.dump(apps, handle, transform=no_trailing_spaces_for_urls)
3137

3238

3339
def apps_from_auth0():

0 commit comments

Comments
 (0)