hermes: match canonical Forgejo PR URL
This commit is contained in:
parent
6c644d727e
commit
0167e7068b
@ -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,
|
||||
|
||||
@ -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"}},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user