Email Address Remapping

Email aliases come up in a variety of scenarios - simply put, people often do work under multiple email addresses and it is useful to merge statistics together. Here's how you would handle this in a variety of scenarios...

Manual Assignment

When an author commits under a new or second/third email address, first let the scanner first pick up their new commits, which will create a new Author in the database. Then, find the old email address in Django admin under 'Authors', and edit the "alias_for" field to point to the primary record.

Automated Detection & Assignment

SourceOptics can automatically assign authors that share the same full names to the same records in a way that is a little more friendly for batch processing, but it still should involve some manual review.

First, generate a plan file for the organization:

python3 deduplicate_authors -o  -f  -p

This creates a plan file in TOML format, which you should manually review for false positives, and edit as you see fit. You can delete anything in there you don't want to map. When ready, execute the plan file to set the alias pointers, which does exactly the same thing you would do in the web interface.

python3 deduplicate_authors -o  -f  -x

Recomputing Stats

Once aliases are in the system, the repository stats will not show information unless a force scan is run.

ssh-agent python3 scan -o  -F

NOTE: If an user merely wants to change names or correct a spelling error in a name, you can edit the display name in Django Admin, and skip all of the above steps.

NOTE: If you have an alias entered and want to make it a primary address instead, simply find that address in Django Admin under "Authors" and pick the "Make Primary" action from the dropdown. This will make the primary account an alias for the record and vice versa. You will still need to force rescan the repo to move the statistics calculations.