Update author annotation to give partial authorship for code blocks#1
Open
Update author annotation to give partial authorship for code blocks#1
Conversation
A particular code block might have input from more than 1 person. For example, another person might have resolved conflicts that arose from a merge. Current assignment is all or nothing for any particular line. Let's extend the author notation to credit multiple contributors with fields to enter a percentage representation of contribution.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A particular code block might have input from more than 1 person.
For example, another person might have resolved conflicts that arose
from a merge. Current assignment is all or nothing for any particular
line.
Let's extend the author notation to credit multiple contributors
with fields to enter a percentage representation of contribution.
Example of an annotation:
"@@author hpkoh 30 xyz 70" of a particular code block give
@hpkoh authorship of 30% of the total lines and @xyz authorship of
70 percent of the total lines.
TextBlockInfo classencapsulates blocks of codes that are group togethertypically because the accurate attribution of that particular block deviates
from the git blame information and is manually annotated.
Lines belonging to this class is removed from
FileInfo.linesso they are not iterated through doublylike before.
TextBlockInfo.contributionMapstores the contribution weight of every author given in the author tagIn the above example
"hpkoh" will have the value "30" and "xyz" will have the value "70"
TextBlockInfo.absoluteContributionMapmaps each author with the implicit number of lines attributedto them for the authorship report. It is derived simply by multiplying the total number of lines by the by
the relatively weight of authorship for each author.
For example, if the above example is for a code block of 50 lines,
hpkohwill be attributed with 50 x 30/100= 15 lines and
xyzwill be attributed with 35 lines.Below are screenshots showing the results.

The following file.txt file has a 16 line block which is annotated with " hpkoh 30 xyz 70"
As a result, 11(16 x 0.7) lines of that particular block is attributed to xyz as seen below.

However, the front line has not been updated to support showing partial authorship of a block