FoswikiOrg Plugin: Git User Mapping

This topic implements an optional mapping of github account information to the WikiName of the committer/author. When a "push" event occurs, the github account information is included in the push information

Identifying Information

Two or three fields are provided on each push:

"name"
The name provided on the github user account. Typically this provide as "First Last", although older github accounts might use this as the username (see below),
"email"
The email address registered on the github user account.,
"username"
The github account userid.

The information is provided in two blocks within the push. "Author" and "Committer". The author information represents the original author of the commit. This is obtained from information like a pull request. The committer is the user who pushes the commit to the github repository.

TIP Do not edit this topic directly. Copy it into your Main web, or to the web.topic identified in the configuration to activate it. This topic can expose private / personal email addresses. It should be view restricted to the AdminGroup or other trusted group.
      "author": {
        "name": "joe",
        "email": "joe@foswiki.com",
        "username": "joe123"
      },
      "committer": {
        "name": "Weblate",
        "email": "weblate@foswiki.org",
      },

Mapping Table

Fill in the name, email and username of the github account, along with the WikiName that should be attributed for the checkins in the Tasks web. When a push is receved, the Author name, email and username, then Committer name, email and username are checked for a match in this table. The exact match will be used to assign the wikiname.

To map an entry when the github push is missing an entry, create a mapping entry using the string 'undef' in place of the name, email and/or username fields.

Be sure this table saves as a TML table. Any line in this topic beginning with vertical bar will be considered as a table entry

The following example push would match the "author" in the above example and assign the commit to TheAuthor. The 2nd line would match the committer, however the committer is only examined if the author field cannot be resolved.

name email username WikiName
joe joe@foswiki.com joe123 TheAuthor
Weblate weblate@foswiki.org undef WikiTranslationGnome
Topic revision: r1 - 07 Feb 2018, ProjectContributor
This site is powered by FoswikiCopyright © by the contributing authors. All material on this site is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback