ci(tracker): require one metadata owner per pull request
test / integration-docker (pull_request) Successful in 20s
tracker-policy-pr / check-pr (pull_request) Successful in 6s
lint / lint (push) Successful in 1m2s
test / unit (pull_request) Successful in 3m59s
test / coverage (pull_request) Successful in 41s

This commit is contained in:
2026-07-26 06:49:06 +00:00
parent 1824f2a388
commit 652d4ba581
3 changed files with 31 additions and 8 deletions
+6
View File
@@ -55,6 +55,12 @@ def check_pull_request(event: dict[str, Any], api: GiteaApi) -> list[str]:
errors: list[str] = []
labels = pull.get("labels") or []
numbers = deliberate_issue_numbers(pull.get("title", ""), pull.get("body", ""))
if labels and numbers:
errors.append(
"PR must use exactly one tracking mode: remove PR labels when "
"linking an issue, or remove the issue reference when labels "
"belong on the PR."
)
if not numbers:
if not labels:
errors.append(