mirror of
https://github.com/zulip/zulip.git
synced 2025-11-13 18:36:36 +00:00
types: Add EditHistoryEvent and APIEditHistoryEvent types.
These types will help make iteration on this code easier. Note that `user_id` can be null due to the fact that edit history entries before March 2017 did not log the user that made the edit, which was years after supporting topic edits (discovered in test deployment of migration on chat.zulip.org). Co-authored-by: Lauryn Menard <lauryn.menard@gmail.com>
This commit is contained in:
@@ -13,6 +13,7 @@ from zulint.custom_rules import Rule, RuleList
|
||||
FILES_WITH_LEGACY_SUBJECT = {
|
||||
# This basically requires a big DB migration:
|
||||
"zerver/lib/topic.py",
|
||||
"zerver/lib/types.py",
|
||||
# This is for backward compatibility.
|
||||
"zerver/tests/test_legacy_subject.py",
|
||||
# Other migration-related changes require extreme care.
|
||||
@@ -229,7 +230,7 @@ python_rules = RuleList(
|
||||
rules=[
|
||||
{
|
||||
"pattern": "subject|SUBJECT",
|
||||
"exclude_pattern": "subject to the|email|outbox",
|
||||
"exclude_pattern": "subject to the|email|outbox|edit_history_event",
|
||||
"description": "avoid subject as a var",
|
||||
"good_lines": ["topic_name"],
|
||||
"bad_lines": ['subject="foo"', " MAX_SUBJECT_LEN"],
|
||||
|
||||
Reference in New Issue
Block a user