Wikidata:Property proposal/changeset

changeset

edit

Originally proposed at Wikidata:Property proposal/Computing

   Done: changeset (P11269) (Talk and documentation)
Descriptionshould be used for references to version control changesets (where the source code repository that contains them is stated with P1324 for the subject of the statement)
Representschangeset (Q5071951)
Data typeString
Example 1Leaflet (Q13685322)inception (P571)1 September 2010
with reference changeseteb5b7d706b9f439863172c522add77a0193dbda8
Example 2Rust (Q575650)software quality assurance (P2992)continuous integration (Q965769)platform (P400)GitHub Actions (Q97185096)
with reference changeset9beb8f54774ca0d41dd2eb7622809f4073676757
Example 3Bootstrap (Q893195)build system (P11197)Rollup (Q114900810)
with reference changeset9936bf59444c402b653f28449529eab83794e911
Example 4Linux kernel (Q14579)mascot (P822)Tuz (Q38806)
with reference changeset8032b526d1a3bd91ad633dd3a3b5fdbc47ad54f1
Example 5SPARQL query for more examples
See alsoreference URL (P854), checksum (P4092)

Motivation

edit

Statements about software often cite a particular changeset (Q5071951) via its identifying hashsum. Currently this is done by using reference URL (P854)

e.g. reference URL (P854)https://github.com/Leaflet/Leaflet/commit/eb5b7d706b9f439863172c522add77a0193dbda8

I suggest the introduction of a new "changeset" property so that we could instead state:

  • changeseteb5b7d706b9f439863172c522add77a0193dbda8

Which has the following advantages:

In order to allow these commit hashes to still be resolved to URLs this proposal also introduces a new #commit formatter URL suffix property. So for example:

With these three statements a data consumer could resolve "eb5b7d706b9f439863172c522add77a0193dbda8" to "https://github.com/Leaflet/Leaflet" + "/commit/$1" where $1 is the hash → https://github.com/Leaflet/Leaflet/commit/eb5b7d706b9f439863172c522add77a0193dbda8.

This works great for the majority of software which has one primary source code repository. For software that has several source code repository URL (P1324) statements (e.g. the source code of CodeMirror (Q114901858) is split up across eight repositories) data consumers can instead link the commit via the search formatter URL (P4354) of the web interface software (P10627) e.g. https://github.com/search?q=eb5b7d706b9f439863172c522add77a0193dbda8 (and clicking on the "commits" menu item there yields the same commit).

--Push-f (talk) 12:09, 15 November 2022 (UTC)[reply]

Discussion

edit

changeset formatter URL suffix

edit

Originally proposed at Wikidata:Property proposal/Generic

   Withdrawn
Descriptionstring that has to be appended to the URL of a repository to link a specific changeset within the repository ("$1" can be automatically replaced with the changeset identifier)
Data typeString
Domainitems that are instances of repository web interface (Q115217949)
Example 1GitHub (Q364)/commit/$1
Example 2GitLab (Q16639197)/-/commit/$1
Example 3cgit (Q28974765)/commit/?id=$1
Example 4Gitea (Q28714270)/commit/$1
Example 5Gitiles (Q111038621)/+/$1
Example 6SourceHut (Q78514485)/commit/$1
Example 7Bitbucket (Q2493781)/commits/$1
Example 8Gitweb (Q97460957)/commit/$1
Example 9hgweb (Q112183167)/rev/$1
Example 10Nest (Q115217392)/changes/$1
Example 11Pagure (Q111750799)/c/$1
Example 12Gogs (Q21091728)/commit/$1
Example 13Codeberg (Q106102182)/commit/$1
Example 14stagit (Q97456355)/commit/$1.html
Example 15Heptapod (Q111410232)/-/commit/$1
Example 16Fossil (Q1439431)/info/$1
Example 17darcsden (Q115267340)/patch/$1
See alsosearch formatter URL (P4354)

See #changeset for the motivation and discussion.