hermes: match canonical Forgejo PR URL

This commit is contained in:
jenkins 2026-08-16 20:21:04 -03:00
parent 6c644d727e
commit 0167e7068b
2 changed files with 2 additions and 3 deletions

View File

@ -337,13 +337,12 @@ def _require_create_response(
raise PolicyError("Forgejo omitted a valid pull-request number")
full_name = f"{ALLOWED_OWNER}/{repo}"
expected_html = f"{CANONICAL_BASE_URL}/{full_name}/pulls/{number}"
expected_api = f"{CANONICAL_BASE_URL}/api/v1/repos/{full_name}/pulls/{number}"
checks = (
document.get("state") == "open",
document.get("draft") is True,
document.get("merged") is False,
document.get("html_url") == expected_html,
document.get("url") == expected_api,
document.get("url") == expected_html,
document.get("title") == title,
document.get("body") == body,
_nested(document, "base", "ref") == base,

View File

@ -43,7 +43,7 @@ def _draft_response(**updates):
"draft": True,
"merged": False,
"html_url": "https://scm.bstein.dev/atlas/cassandra/pulls/3",
"url": "https://scm.bstein.dev/api/v1/repos/atlas/cassandra/pulls/3",
"url": "https://scm.bstein.dev/atlas/cassandra/pulls/3",
"title": "WIP: Focused fix",
"body": "Review evidence",
"base": {"ref": "main", "repo": {"full_name": "atlas/cassandra"}},