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

Change subject: Revision-Create: Include rev_content_changed field.
......................................................................

Revision-Create: Include rev_content_changed field.

Some actions, for example protecting the pages, create a new
revision but don't actually change the page content. If a major
template on a wiki gets protected, we're doing an enormous amount
of work rerendering dependencies while we know the result will
not change.

Change-Id: Ia5492563e8e88b60eba49eccf603b1599c6c3a74
---
A jsonschema/mediawiki/page/create/1.yaml
M jsonschema/mediawiki/revision/create/1.yaml
2 files changed, 171 insertions(+), 0 deletions(-)


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

diff --git a/jsonschema/mediawiki/page/create/1.yaml 
b/jsonschema/mediawiki/page/create/1.yaml
new file mode 100644
index 0000000..3ee33c4
--- /dev/null
+++ b/jsonschema/mediawiki/page/create/1.yaml
@@ -0,0 +1,167 @@
+title: mediawiki/revision/create
+description: >
+  Represents a MW Revision Create event.
+$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
+
+  comment:
+    description: The comment left by the user that performed this change.
+    type: string
+
+
+  ### revision entity fields - all revision related events should have these.
+  page_id:
+    description: The page ID of the page this revision belongs to.
+    type: integer
+    minimum: 1
+
+  page_title:
+    description: The normalized title of the page this revision belongs to.
+    type: string
+
+  page_namespace:
+    description: The namespace of the page this revision belongs to.
+    type: integer
+
+  rev_id:
+    description: The revision ID created by this event
+    type: integer
+    minimum: 0
+
+  rev_parent_id:
+    description: The parent revision of the revision that this event affects.
+    type: integer
+    minimum: 0
+
+  rev_timestamp:
+    description: >
+      The revision's creation time in ISO8601 format.  This field
+      does not end in '_dt' to better match the field name on the
+      Mediawiki revision table.
+    type: string
+    format: date-time
+
+  rev_sha1:
+    description: The sha1 of the revision text.
+    type: string
+
+  rev_len:
+    description: The length of the revision text in bytes.
+    type: integer
+
+  rev_minor_edit:
+    description: Flag identifying if the revision is minor.
+    type: boolean
+
+  rev_content_model:
+    description: The content model of the revision.
+    type: string
+
+  rev_content_format:
+    description: The content format of the revision.
+    type: string
+
+  page_is_redirect:
+    description: >
+      True if this revision is a redirect.  This
+      fact is ultimately represented by revision content containing
+      redirect wikitext.  If this revision is the head revision
+      of the page, then the page will also be a redirect.
+    type: boolean
+
+
+required:
+  - meta
+  - database
+  - performer
+  - page_id
+  - page_title
+  - page_namespace
+  - rev_id
+  - rev_timestamp
diff --git a/jsonschema/mediawiki/revision/create/1.yaml 
b/jsonschema/mediawiki/revision/create/1.yaml
index 3ee33c4..81a7e9e 100644
--- a/jsonschema/mediawiki/revision/create/1.yaml
+++ b/jsonschema/mediawiki/revision/create/1.yaml
@@ -147,6 +147,10 @@
     description: The content format of the revision.
     type: string
 
+  rev_content_changed:
+    description: Whether the revision actually changes the page content.
+    type: boolean
+
   page_is_redirect:
     description: >
       True if this revision is a redirect.  This

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia5492563e8e88b60eba49eccf603b1599c6c3a74
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/event-schemas
Gerrit-Branch: master
Gerrit-Owner: Ppchelko <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to