Skip to content

Commit 7bac55a

Browse files
committed
Fix
1 parent bdd1a62 commit 7bac55a

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/config.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,12 @@ def clean_extra_workflow_paths(value: Any) -> set[str] | None:
211211

212212
@staticmethod
213213
def clean_pull_request_branch(value: Any) -> str | None:
214-
if value and isinstance(value, str) and value.lower() not in ["main", "master"]:
214+
if value and isinstance(value, str):
215+
if value.lower() in ["main", "master"]:
216+
gha_utils.error(
217+
"Invalid input for `pull_request_branch` field, "
218+
"the action does not support `main` or `master` branches"
219+
)
220+
raise SystemExit(1)
215221
return value
216222
return None

0 commit comments

Comments
 (0)