Problem/Motivation
#2288727: [meta] Provide credit to organizations / customers who contribute to Drupal issues →
aims to provide commit credit to organizations.
This issue is postponed (per #56) on having a few months of comment attribution data to play with.
Proposed resolution
Change the commit message template to a multiline format, similar to the format used by several other open source projects (Linux, OpenStack, Eclipse, Typo3). Put credit information in the "footer" of the commit message, like:
Supported-by: Drupal Association drupal-association@1646370.org.no-reply.drupal.org
This is a representation of [Organization Node Title] [Organization Alias]@[Organization Node ID].org.no-reply.drupal.org, and allows tying the credit back to organization nodes.
An example of a full generated commit message might be for an issue such as
#2183983: Find hidden configuration schema issues →
:
git commit -m 'Issue #2183983: Find hidden configuration schema issues
Contributed-by: Gábor Hojsty <goba@4166.no-reply.drupal.org>
Contributed-by: Vijayachandran Mani <vijaycs85@93488.no-reply.drupal.org>
Contributed-by: Wim Leers <wimleers@99777.no-reply.drupal.org>
Contributed-by: Sascha Grossenbacher <berdir@214652.no-reply.drupal.org>
Contributed-by: Florian Weber <webflo@254778.no-reply.drupal.org>
Contributed-by: Alex Pott <alexpott@157725.no-reply.drupal.org>
Supported-by: Acquia <acquia@1204416.org.no-reply.drupal.org>
Supported-by: Capgemini <capgemini@1772260.org.no-reply.drupal.org>
Supported-by: MD Systems <md-systems@1979456.org.no-reply.drupal.org>
Supported-by: UEBERBIT GmbH <ueberbit@1838438.org.no-reply.drupal.org>
Supported-by: Chapter Three <chapter-three@1121246.org.no-reply.drupal.org>
Supported-by: Some Mysterious Drupal 8 Client <mysterious-d8-client@XXXX.org.no-reply.drupal.org>
Supported-by: Some Other Mysterious Drupal 8 Client <mysterious-d8-client2@XXXX.org.no-reply.drupal.org>
'
We can use historical Git commit mentions to populate historical commit entities to give credit to individual contributors for past contributions. This should keep history in sync going forward. Because of the way that the supported-by element works, we can only track organization commit mentions going forward from the release of this feature.
Other solutions that have been discussed and put aside include using Git notes (while it's the right tool for the job, there is not rich enough support in various clients, and it requires engineering effort on Drupal.org infra side as well), and using special characters to denote individuals vs. employers vs. customers (this is a non-standard "Drupalism," it creates weirdly formatted commit messages that can't ever be changed).
Remaining tasks
Discuss, agree on exact format for implementation.
User interface changes
Auto-generated commit message template in the "Credit & Committing" UI will change;
https://www.drupal.org/node/52287 →
will need to be updated.
API changes
Unknown. In
#48 →
joshuami notes: "All credit will be associated with a commit rather than the issue. We will need to confirm that the commit entity (version control operation) that we store on Drupal.org can have fields, or other storage can be implemented cleanly. We can parse the users and organizations from the commit message, and associate them with the commit entity as user and node entity references."
Original report by @webchick
#2288727: [meta] Provide credit to organizations / customers who contribute to Drupal issues →
aims to provide commit credit to organizations. There are a few ways this can be done:
Embed credit in commit message itself
This is the format proposed at http://buytaert.net/a-method-for-giving-credit-to-organizations-that-con... (slightly tweaked to put the credit at the end in order to keep commit messages sensible, discussed and agreed upon at
#2288727-31: [meta] Provide credit to organizations / customers who contribute to Drupal issues →
and following:
$ git commit -am "Issue #n: message by INDIVIDUAL@AGENCY*CUSTOMER."
For example (this would be auto-generated so just a copy/paste):
$ git commit -m "Issue #42: fixed performance bug by Sam@Acquia, Megan, Tim*Pfizer."
Pros
- No special tooling required; could start using this format immediately.
- Credit is immediately obvious, in a very developer-facing place.
- Credit also visible in third-party tools; GitHub, cgit, Git GUIs such as Tower, etc..... basically every single thing that works with Git knows how to display commit messages.
Cons
- On issues with multiple authors (especially complex core issues) you could easily end up with a 2048+ character commit string.
- A "Drupalism"; no other project does it this way.
Embed credit in Git notes
git notes is a way to add metadata to commits without actually affecting the commits themselves. See https://groups.drupal.org/node/161659 for some prior art on this discussion.
For example (this would be auto-generated so just a copy/paste):
git commit -m “Issue #2125621: Fixed Contrast between title/slogan and header is too low.” --author=“David Hernandez <foo@bar.com>” --git-notes=“davidhernandez*New Jersey Something Something
mgifford@Open Concept
jessebeach@Acquia
mparker17@Open Concept*Government of Canada*Whitehouse
anandps
”
Pros
- Git notes is specifically for storing additional metadata, so we're using Git as Linus (or whoever) intended. :P
- Commit messages can go back to just "Issue #1234: Fixed the thing." which is standard with nearly all other projects.
- Can even go back to old commits and add this information. Doesn't change the commit hash!
- Because this information is not intended to be human-readable per se, can embed much more detailed information, for example actual user / organization IDs, which can ease parse-ability/improve accuracy (however, this seems to be a no-op because according to drumm in #19, the UI being developed at
#2295411: Auto-generate Git attribution info / commit messages on Drupal.org →
will populate tables).
Cons
- Credit not immediately visible without some special tricks, e.g.
git show -s
or custom Drupal.org listings.
- May require significant tooling to get custom listings working on Drupal.org;
#1282040: Add support for reading git-notes →
sounds a bit spooky (though could tie it to the issue rather than the Git commit to work around VCAPI).
- Not a widely used feature, so unknown level of support in third-party tools (Git GUIs, source code browsers, etc.) for displaying Git notes. As a prominent example, GitHub used to have and then recently removed support for displaying git notes.
- Also a "Drupalism"; no other project does it this way.
Embed credit in commit message itself (another way)
Adding a block of text describing attribution in the commit message as the linux kernel or git itself project does it.
Notice we will be extending what those projects do adding a new keyword, "Supported-by".
Detailed:
Signed-off-by: Coder1 Name <coder1@git.mail>
Signed-off-by: Coder2 Name <coder2@git.mail>
Reported-by: Reporter1 Name <reporter1@git.mail>
Tested-by: Tester1 Name <tester1@git.mail>
Reviewed-by: Reviewer1 Name <individual2@git.mail>
Suggested-by: Suggester1 Name <suggester1@git.mail>
Supported-by: Agency1 Name <agency@agency-domain.com>
Supported-by: Customer1 Name <customer@customer-domain.com>
Not detailed:
Signed-off-by: Coder1 Name <coder1@git.mail>
Signed-off-by: Coder2 Name <coder2@git.mail>
Signed-off-by: Reporter1 Name <reporter1@git.mail>
Signed-off-by: Tester1 Name <tester1@git.mail>
Signed-off-by: Reviewer1 Name <individual2@git.mail>
Signed-off-by: Suggester1 Name <suggester1@git.mail>
Supported-by: Agency1 Name <agency@agency-domain.com>
Supported-by: Customer1 Name <customer@customer-domain.com>
Pros
- No special tooling required; could start using this format immediately.
- Credit is immediately obvious, in a very developer-facing place.
- Credit also visible in third-party tools; GitHub, cgit, Git GUIs such as Tower, etc..... basically every single thing that works with Git knows how to display commit messages.
- Not a "Drupalism"!
Cons
- On issues with multiple authors (especially complex core issues) you could easily end up with a 2048+ character commit string.