feat(python/robomp): implemented has_authorized_impl_event in the
- Implement `has_authorized_impl_event` in the database to retrieve historical authorization state. - Update `_enforce_impl_authorization` to permit actions if prior events on the issue provided implementation authorization. - Normalize maintainer logins by stripping `[bot]` suffixes and allow match-regex to ignore them.
This commit is contained in:
@@ -1598,8 +1598,16 @@ def test_webhook_maintainer_bypasses_rate_limit(
|
||||
)
|
||||
assert resp.status_code == 202
|
||||
states.append(resp.json()["state"])
|
||||
directive_event = get_database(cfg.sqlite_path).get_event("m-3")
|
||||
close_database()
|
||||
assert states == ["queued"] * 4, states
|
||||
assert directive_event is not None
|
||||
assert directive_event.payload.get("_robomp_directive") == {
|
||||
"body": "do X",
|
||||
"author": "can1357",
|
||||
"pragmas": [],
|
||||
"authorizes_impl": True,
|
||||
}
|
||||
|
||||
|
||||
# -------- handler-level: bootstrap + reopen ----------------------------
|
||||
|
||||
Reference in New Issue
Block a user