Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/380817 )

Change subject: Add the mediawiki/page/stable-revision-change event schema
......................................................................

Add the mediawiki/page/stable-revision-change event schema

The event schema will allow the system to track changes in stable
revisions for pages as modified via the FlaggedRevs extension.

Bug: T169116
Change-Id: I4e3dcc887a5c73fe8d842f02c061f6dcbd376d6a
---
M config/eventbus-topics.yaml
A jsonschema/mediawiki/page/stable-revision-change/1.yaml
2 files changed, 143 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/event-schemas 
refs/changes/17/380817/1

diff --git a/config/eventbus-topics.yaml b/config/eventbus-topics.yaml
index c26946e..935ba1b 100644
--- a/config/eventbus-topics.yaml
+++ b/config/eventbus-topics.yaml
@@ -29,6 +29,9 @@
 mediawiki.page-restrictions-change:
   schema_name: mediawiki/page/restrictions-change
 
+mediawiki.page-stable-revision-change:
+  schema_name: mediawiki/page/stable-revision-change
+
 mediawiki.revision-visibility-change:
   schema_name: mediawiki/revision/visibility-change
 
diff --git a/jsonschema/mediawiki/page/stable-revision-change/1.yaml 
b/jsonschema/mediawiki/page/stable-revision-change/1.yaml
new file mode 100644
index 0000000..4340736
--- /dev/null
+++ b/jsonschema/mediawiki/page/stable-revision-change/1.yaml
@@ -0,0 +1,140 @@
+title: mediawiki/page/stable-revision-change
+description: Represents a MW Page Stable Revision Change (Flagged Revisions).
+$schema: http://json-schema.org/draft-04/schema#
+type: object
+properties:
+  ### Meta data object.  All events schemas should have this.
+  meta:
+    type: object
+    properties:
+      topic:
+        description: The queue topic name this message belongs to.
+        type: string
+      schema_uri:
+        description: >
+          The URI identifying the jsonschema for this event.  This may be just
+          a short uri containing only the name and revision at the end of the
+          URI path.  e.g. schema_name/12345 is acceptable.  This field
+          is not required.
+        type: string
+      uri:
+        description: The unique URI identifying the event.
+        type: string
+        format: uri
+      request_id:
+        description: The unique UUID v1 ID of the event derived from the 
X-Request-Id header.
+        type: string
+        pattern: '^[a-fA-F0-9]{8}(-[a-fA-F0-9]{4}){3}-[a-fA-F0-9]{12}$'
+      id:
+        description: The unique ID of this event; should match the dt field.
+        type: string
+        pattern: '^[a-fA-F0-9]{8}(-[a-fA-F0-9]{4}){3}-[a-fA-F0-9]{12}$'
+      dt:
+        description: The time stamp of the event, in ISO8601 format.
+        type: string
+        format: date-time
+      domain:
+        description: The domain the event pertains to.
+        type: string
+    required:
+      - topic
+      - uri
+      - id
+      - dt
+      - domain
+
+
+  ### Mediawiki entity fields.  All Mediawiki entity events should have these.
+  database:
+    description: The name of the wiki database this event belongs to.
+    type: string
+
+  performer:
+    description: Represents the user that performed this change.
+    type: object
+    properties:
+      user_id:
+        description: >
+          The user id that performed this change.  This is optional, and
+          will not be present for anonymous users.
+        type: integer
+      user_text:
+        description: The text representation of the user that performed this 
change.
+        type: string
+      user_groups:
+        description: A list of the groups this user belongs to.  E.g. bot, 
sysop etc.
+        type: array
+        items:
+          type: string
+      user_is_bot:
+        description: >
+          True if this user is considered to be a bot.  This is checked
+          via the $user->isBot() method, which considers both user_groups
+          and user permissions.
+        type: boolean
+      user_registration_dt:
+        description: >
+          The datetime of the user account registration.
+          Not present for anonymous users or if missing in the MW database.
+        type: string
+        format: date-time
+      user_edit_count:
+        description: >
+          The number of edits this user has made at the time this revision is 
created.
+          Not present for anonymous users.
+        type: integer
+        minimum: 0
+    required:
+      - user_text
+      - user_groups
+      - user_is_bot
+
+  ### page entity fields - all page related events should have these.
+  page_id:
+    description: The page ID of the page for which the stable revision has 
been changed.
+    type: integer
+    minimum: 1
+
+  page_title:
+    description: The normalized title of the page.
+    type: string
+
+  page_namespace:
+    description: The namespace ID this page belongs to.
+    type: integer
+
+  page_is_redirect:
+    description: >
+      True if this page is currently a redirect page. This
+      fact is ultimately represented by revision content containing
+      redirect wikitext.  If rev_ids content has redirect wikitext,
+      then this page is a redirect.  Note that this state is also
+      stored on the Mediawiki page table.
+    type: boolean
+
+  rev_id:
+    description: The head revision of the page for which the stable revision 
has been changed.
+    type: integer
+    minimum: 0
+
+
+  ### stable revision change specific fields.
+  stable_rev_id: &stable_id
+    description: The new stable revision ID
+    type: integer
+    minimum: 0
+
+  prior_state:
+    description: The prior state of the entity before this event.
+    type: object
+    properties:
+      stable_rev_id: *stable_id
+
+required:
+  - meta
+  - database
+  - page_id
+  - page_title
+  - page_namespace
+  - page_is_redirect
+  - rev_id

-- 
To view, visit https://gerrit.wikimedia.org/r/380817
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4e3dcc887a5c73fe8d842f02c061f6dcbd376d6a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/event-schemas
Gerrit-Branch: master
Gerrit-Owner: Mobrovac <mobro...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to