Skip to content
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

Wrong contribution type being added to .all-contributorsrc despite the error #71

Closed
machour opened this issue Nov 10, 2017 · 4 comments
Closed

Comments

@machour
Copy link
Collaborator

machour commented Nov 10, 2017

If I add a contributor with a non existant contribution type (bar) an error message is printed 👍 but the contribution is still being added to the .all-contributorsrc file 👎

🍺  ~/git-point (master)*$ yarn contributors:add foo bar
$ all-contributors add foo bar
Unknown contribution type bar for contributor foo
error Command failed with exit code 1.
🍺  ~/git-point (master)*$ git diff .all-contributorsrc
diff --git a/.all-contributorsrc b/.all-contributorsrc
index 3dc0ef3..fc4dee2 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -635,6 +635,15 @@
       "avatar_url": "https://avatars0.githubusercontent.com/u/3683673?v=4",
       "profile": "https://thecodetalker.github.io/",
       "contributions": []
+    },
+    {
+      "login": "foo",
+      "name": "Foo Bar",
+      "avatar_url": "https://avatars0.githubusercontent.com/u/333184?v=4",
+      "profile": "http://dblp2.uni-trier.de/pers/hd/p/Foo:Bar",
+      "contributions": [
+        "bar"
+      ]
     }
   ]
 }

What should happen is:

  • wrong contributions type being reported and not written in
  • if all contributions types were wrong, the user shouldn't be added in the file
@M-ZubairAhmed
Copy link
Contributor

can i take this one?

@machour
Copy link
Collaborator Author

machour commented Dec 5, 2017

Of course 🎉
Let us know if you need any help!

@M-ZubairAhmed
Copy link
Contributor

@machour sorry for keeping lagging on this for too long.
So i tried to reproduce this error, when we add foo bar it does gets added to .all-contributorsrc but not to README.md when you try to generate. Is this correct?

@M-ZubairAhmed
Copy link
Contributor

if user has input typo in one of the options as add foo code,video,bar. Should except bar others be added?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants