KDevelop/AuthorIdentities
Definition
"Author identity": metadata about an identity/role taken when writing source code or creating other resources
Motivation
When it comes to copyright notions in files and authorship/committer id in version control systems, the name and the contact information, like email address, can be a few different ones for oneself. E.g. when working in different FLOSS projects, with each email address dedicated to the project, or when working on a FLOSS project both in name of an employer, but also privately in free times.
As these data is usually fixed for a given project, and same sets of the data are used in different projects, it would be nice to have this data in a central datastore for reuse and automatic update across projects. Per project the selected data set would be automatically used when the values are needed, like on generation of code or when operating in the version control system.
Initial Plans
Marching plan:
- Collect user stories to gain idea of problem space: what kind of identity data is used when and where, what identity data sources can be used or need to by synced with
- Collect previous/existing attempts/approaches to learn more about solution space
- magic happens
- Profit!
Data Models
Identity:
- internal id
- display name for identity, to be used in selections
- display picture to be used along/in-place of display names
- full name
- email address
- copyright owner (if contract work)
- copyright owner contact data, email/phone/webaddress (if contract work) -> perhaps separate model?
- ?
- alias email addresses, older email addresses
- alias full name, old full name (marriage, gender change, different details)
- account in related project management server (build server, review server, task management server, issue server, ...)
Identity manager:
- allows creation/editing/deletion of identities
- setting the standard identity, preselected for new projects
- multiple backends possible, to allow adapting to custom addressbook system/
LDAP/*, for updating automatically to any changes?
Project:
- has at least one identity assigned
- identity is configured on creation, defaults to standard
- active identity queried for name & email address on creation from templates
- vcs commit metadata settings updated on selecting active identity
User stories
Use case
working on different projects with same system, for different customers or different groups using KDevelop with file & app templates for different projects/customers
Use case
working on same project with same system both for job and privately, using different identity to mark copyright of contributions
Use case
import project, derive identity from account/server/fetched project
Use case
detect own commits in vcs history (needs support for multiple ids perhaps) by name and/or email (blacklist/whitelist to protect against wrong matches) to do what?
more interesting might be integrating commit ids with addressbook, to allow further contactdata-based actions
Challenges
Syncing data with git
git has its own system to store author identity data, which can be edited directly. How to detect any direct changes? How to deal with it e.g. on importing an existing project?
on importing, if not matchable to defined identities, ask whether to create new identity in system or to overwrite with existing?
Existing solutions of other products
?
Available technical features
Currently KDevelop is hard-coded to use whatever is set for the default profile of KEMailSettings in file templates, the only place which I found to use authorship metadata. KMail seems to be feeding KEMailSettings, but otherwise there might be no data in there. https://lxr.kde.org/source/kde/pim/kidentitymanagement/src/identitymanager.cpp