-
-
Notifications
You must be signed in to change notification settings - Fork 354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🤖 Add authors and contributors to Practice Exercises #1519
🤖 Add authors and contributors to Practice Exercises #1519
Conversation
For each Practice Exercise, we've looked at the commit history of its files to see which commits touched that Practice Exercise. Each commit that we could associate with a Practice Exercise was used to determine authorship/contributorship. ### Authors 1. Find the Git commit author of the oldest commit linked to that Practice Exercise 2. Find the GitHub username for the Git commit author of that commit 3. Add the GitHub username of the Git commit author to the `authors` key in the `.meta/config.json` file ### Contributors 1. Find the Git commit authors and any co-authors of all but the oldest commit linked to that Practice Exercise. If there is only one commit, there won't be any contributors. 1. Exclude the Git commit author and any co-authors of the oldest commit from the list of Git commit authors (an author is _not_ also a contributor) 2. Find the GitHub usernames for the Git commit authors and any co-authors of those commits 3. Add the GitHub usernames of the Git commit authors and any co-authors to the `contributor` key in the `.meta/config.json` file We used the GitHub GraphQL API to find the username of a commit author or any co-authors. In some cases though, a username cannot be found for a commit (e.g. due to the user account no longer existing), in which case the commit was skipped. ## Renames There are a small number of Practice Exercises that might have been renamed at some point. You can ask Git to "follow" a file over its renames using `git log --follow <file>`, which will also return commits made before renames. Unfortunately, Git does not store renames, it just stores the contents of the renamed files and tries to guess if a file was renamed by looking at its contents. This _can_ (and will) lead to false positives, where Git will think a file has been renamed whereas it hasn't. As we don't want to have incorrect authors/contributors for exercises, we're ignoring renames. The only exception to this are known exercise renames: - `bracket-push` was renamed to `matching-brackets` - `retree` was renamed to `satellite` - `resistor-colors` was renamed to `resistor-color-duo` - `kindergarden-garden` was renamed to `kindergarten-garden` ## Exclusions There are some commits that we skipped over, and which thus didn't influence the authors/contributors list: - Commits authored by `dependabot[bot]`, `dependabot-preview[bot]` or `github-actions[bot]` - Bulk update PRs made by `ErikSchierboom` or `kytrinx` to update the track
(cc @rprouse, @ruanha, @ryanrobidou, @ShamilS, @sjakobi, @sjwarner, @sjwarner-bp, @SleeplessByte, @Thorocaine, @tomschluter, @tushartyagi, @valentin-p, @vamcs, @vgrigoriu, @wolf99, @yvincent, @Zureka) |
This is mostly looking good as far as I can tell. The main thing that we should probably focus on is removing contributors that were added for cross-exercise commits. Some examples: Of course, the above users should still be attributed for actual contributions that were made. One helpful tool that we can use is to check the commits for a specific authors within GitHub (e.g. https://github.com/exercism/csharp/commits?author=j2jensen) |
@@ -1,6 +1,18 @@ | |||
{ | |||
"blurb": "Bob is a lackadaisical teenager. In conversation, his responses are very limited.", | |||
"authors": [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -1,6 +1,16 @@ | |||
{ | |||
"blurb": "Given a word and a list of possible anagrams, select the correct sublist.", | |||
"authors": [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems like the author is not on github anymore.
4d73a89#diff-f728d1403cb3fe678829db17dc5f51008197dc4d22c88984a1af842e80b6c206
@@ -1,6 +1,16 @@ | |||
{ | |||
"blurb": "Calculate the Hamming difference between two DNA strands.", | |||
"authors": [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
author not on github
@@ -1,6 +1,17 @@ | |||
{ | |||
"blurb": "Given a phrase, count the occurrences of each word in that phrase.", | |||
"authors": [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: valentin-p <[email protected]>
Co-authored-by: valentin-p <[email protected]>
Co-authored-by: valentin-p <[email protected]>
Thanks @valentin-p! I'll work on creating a script to remove the cross-exercise commits. |
I've looked at removing the cross-exercise commits, but that will be very hard to do as there are so many cross-exercise commits.
Maybe we need additional rules? |
I've decided that it won't reasonably be possible to determine which commit should be considered for counting towards being an author/contributor. I feel that it is better to err on the side of being generous here. We can be more strict from now on. |
If you got tagged in this PR, it is because you are being credited for work you've done in the past on Exercism here, and we want to ensure you don't miss out on the recognition you deserve 🙂
With v3, we've introduced the idea of exercise authors and contributors. This information is stored in the exercises'
.meta/config.json
files (see the docs).Concept Exercises, which are all new, already contain authors and contributors. Practice Exercises though are missing this information. In this PR, we attempt to populate the authors and contributors of Practice Exercises based on their commit history.
Maintainer TODO list
These are the things you, the maintainers, should do:
For clarity, authors should be the people who originally created the exercise on this track. Contributors should be people who have substantially contributed to that exercise. PRs for typos or multiple-exercise PRs do not automatically mean someone should be considered a contributor to that exercise. Those non-exercise-specific contributions will get recognition through Exercism's reputation system in v3.
If you find something needs updating, just push a new commit to this PR.
Automatic Merging
We will automatically merge this PR before we launch v3, but will give the maximum time we can to maintainers to review it first.
The rest of this issue explains how this PR has been generated. You do not need to read it.
Algorithm
We start out by looking at the current Practice Exercises. For each Practice Exercise, we'll look at the commit history of its files to see which commits touched that Practice Exercise. How renames are handled is discussed in the "Renames" section later in this document.
Any commit that we can associate with a Practice Exercise is used to determine authorship/contributorship. Here is how we assign authorship/contributorship:
Authors
authors
key in the.meta/config.json
fileContributors
contributor
key in the.meta/config.json
fileWe're using the GitHub GraphQL API to find the username of a commit author and any co-authors. In some cases though, a username cannot be found for a commit (e.g. due to the user account no longer existing), in which case we'll skip the commit.
Renames
There are a small number of Practice Exercises that might have been renamed at some point. You can ask Git to "follow" a file over its renames using
git log --follow <file>
, which will also return commits made before renames. Unfortunately, Git does not store renames, it just stores the contents of the renamed files and tries to guess if a file was renamed by looking at its contents. This can (and will) lead to false positives, where Git will think a file has been renamed whereas it hasn't. As we don't want to have incorrect authors/contributors for exercises, we're ignoring renames. The only exception to this are known exercise renames:bracket-push
was renamed tomatching-brackets
retree
was renamed tosatellite
resistor-colors
was renamed toresistor-color-duo
kindergarden-garden
was renamed tokindergarten-garden
If you know of a rename of a Practice Exercise, please check to see if its authors and contributors are correctly set.
Exclusions
There are some commits that we skip over, which thus don't influence the authors/contributors list:
dependabot[bot]
,dependabot-preview[bot]
orgithub-actions[bot]
ErikSchierboom
orkytrinx
to update the trackTracking
exercism/v3-launch#24
cc @abecerramatias, @aes421, @AndrewYHuang, @artiom, @austinlyons, @avjgit, @B1tF8er, @balazsbotond, @bcwood, @bjorkqvist, @bmeverett, @bressain, @ChrisPritchard, @cmccandless, @davidelettieri, @delve, @deniscapeto, @dmahnkopf, @duffn, @ErikSchierboom, @felix91gr, @FizzBuzz791, @FridaTveit, @GKotfis, @haus, @inkahootz, @irrationalRock, @j2jensen, @jdehaan, @jenlouie, @jmbradnan, @joostas, @jpreese, @jwood803, @kytrinyx, @MahrWe, @martinfreedman, @mattcbaker, @mikecoop, @morrme, @mrtank, @NextNebula, @nicolastarzia, @PatrickMcSweeny, @petertseng, @pjangam, @pminten, @robkeim, @RoelofWobben, @rpottsoh, @rprouse, @ruanha, @ryanrobidou, @ShamilS, @sjakobi, @sjwarner, @sjwarner-bp, @SleeplessByte, @Thorocaine, @tomschluter, @tushartyagi, @valentin-p, @vamcs, @vgrigoriu, @wolf99, @yvincent, @Zureka as you are referenced in this PR