Page MenuHomePhabricator

Model contributions as distinct from revisions
Closed, ResolvedPublic


In the initial implementation of the contributions endpoint, the response contains a "revisions" field that contains a list of revision entities. However, not all contributions are page revisions in the strict sense. Extensions such as Flow can inject contributions that are not revisions. Conceptually, this means that contributions are an entity that is separate from a revision, and there is a specific kind of contribution that creates a page revision. To model this, the response structure is to be changed as follows:

  1. replace the "revisions" key with a "contributions" key, containing a list of objects, each modeling one contribution.
  2. model each contribution just like we have so far modeled a revision (see T252202), but add a "type" field which for revision contribution always has the value "revision".

Event Timeline

daniel created this task.Jul 13 2020, 1:56 PM

Change 613289 had a related patch set uploaded (by Nikki Nikkhoui; owner: Nikki Nikkhoui):
[mediawiki/core@master] Rename 'revisions' to 'contributions'

@daniel I think I need to go through and rename more things to 'contribution' e.g. ContributionSegment->getRevisions() to ContributionsSegment->getContributions () yea?

Change 613289 merged by jenkins-bot:
[mediawiki/core@master] Rename 'revisions' to 'contributions'

eprodromou added a subscriber: nnikkhoui.
eprodromou closed this task as Resolved.Wed, Sep 16, 2:57 PM