-
Notifications
You must be signed in to change notification settings - Fork 146
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
Duplicate entries when adding a contributor twice #62
Comments
If I'm not mistaken, that's what it does. If it doesn't do that already, then that's a bug. |
@GantMan tried with 4.7.0, I can't reproduce what you're describing: # no differences on start
🍺 ~/git-point (master)*$ git diff .all-contributorsrc
🍺 ~/git-point (master)*$ ./node_modules/.bin/all-contributors add foo doc
# foo correctly added
🍺 ~/git-point (master)*$ git diff .all-contributorsrc
diff --git a/.all-contributorsrc b/.all-contributorsrc
index 6e89eaa..5bb0bbd 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -628,6 +628,15 @@
"contributions": [
"translation"
]
+ },
+ {
+ "login": "foo",
+ "name": "Foobar",
+ "avatar_url": "https://avatars0.githubusercontent.com/u/33384?v=4",
+ "profile": "http://dblp2.uni-trier.de/pers/hd/p/Foo:bar",
+ "contributions": [
+ "doc"
+ ]
}
]
}
🍺 ~/git-point (master)*$ ./node_modules/.bin/all-contributors add foo doc
🍺 ~/git-point (master)*$ ./node_modules/.bin/all-contributors add foo doc
🍺 ~/git-point (master)*$ ./node_modules/.bin/all-contributors add foo doc
🍺 ~/git-point (master)*$ ./node_modules/.bin/all-contributors add foo doc
# No duplication
🍺 ~/git-point (master)*$ git diff .all-contributorsrc
diff --git a/.all-contributorsrc b/.all-contributorsrc
index 6e89eaa..5bb0bbd 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -628,6 +628,15 @@
"contributions": [
"translation"
]
+ },
+ {
+ "login": "foo",
+ "name": "Foo Bar",
+ "avatar_url": "https://avatars0.githubusercontent.com/u/33384?v=4",
+ "profile": "http://dblp2.uni-trier.de/pers/hd/p/Foo:bar",
+ "contributions": [
+ "doc"
+ ]
}
]
}
🍺 ~/git-point (master)*$ ./node_modules/.bin/all-contributors add foo doc,code
# doc kept, code added when specifying old and new contribution
🍺 ~/git-point (master)*$ git diff .all-contributorsrc
diff --git a/.all-contributorsrc b/.all-contributorsrc
index 6e89eaa..a5053b1 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -628,6 +628,16 @@
"contributions": [
"translation"
]
+ },
+ {
+ "login": "foo",
+ "name": "Foo Bar",
+ "avatar_url": "https://avatars0.githubusercontent.com/u/33384?v=4",
+ "profile": "http://dblp2.uni-trier.de/pers/hd/p/Foo:bar",
+ "contributions": [
+ "doc",
+ "code"
+ ]
}
]
}
# doc & code kept, and bugs added when specifying only the new contribution
🍺 ~/git-point (master)*$ ./node_modules/.bin/all-contributors add foo bugs
🍺 ~/git-point (master)*$ git diff .all-contributorsrc
diff --git a/.all-contributorsrc b/.all-contributorsrc
index 6e89eaa..3d38887 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -628,6 +628,17 @@
"contributions": [
"translation"
]
+ },
+ {
+ "login": "foo",
+ "name": "Foo Bar",
+ "avatar_url": "https://avatars0.githubusercontent.com/u/33384?v=4",
+ "profile": "http://dblp2.uni-trier.de/pers/hd/p/Foo:bar",
+ "contributions": [
+ "doc",
+ "code",
+ "bugs"
+ ]
}
]
}
Can you provide the same test as me, adding a new user? |
Yup! Fortunately, the whole thing is open source. I created a ticket to add It was provided in a PR here: infinitered/solidarity#119 You can pull his branch and reproduce. One thing worth noting, is that the changes are not meant for the readme.md, they are stored in a separate MD. This might be the difference. Also 🎉 on the fast responses to this ticket! 👏 |
@machour - my global is 4.7.0, I just checked. I also, started a fresh branch on master and tried it out: ❌ |
|
Hmmm... We don't recommend installing this globally. And sadly we don't currently support a |
@GantMan I'm using 4.7.0 from npm on As Kent mentioned, I think it would be better to get rid of your global package. Then you may need to add some Let us know what you find out 🕵️ |
Are you sure that your global version of |
I broke the code open and found the bug. PR coming soon hopefully. |
if I add the same user with the same contributions, shouldn't it just no op?
And then if I add an existing user with a new contribution, shouldn't it just modify that contributor's contributions array? As far as for a CLI, it should be smart about the existing contents of the
.all-contributorsrc
correct?The text was updated successfully, but these errors were encountered: