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

Bug: Unknown contribution type error when trying to run the npm run contributors:add command #155

Closed
2 tasks done
jdwilkin4 opened this issue Oct 25, 2023 · 8 comments · Fixed by #156
Closed
2 tasks done
Assignees
Labels
🐛 bug Something isn't working

Comments

@jdwilkin4
Copy link
Contributor

Describe the bug

I tried running the npm run contributors:add command locally, and ran into this error

Error: Unknown contribution type web development for contributor

Here is the complete screenshot

Screenshot 2023-10-25 at 12 06 59 PM

The error is happening because web development is not a valid entry for the contributions array

 "contributions": [
        "web development"
      ]

the fix would be to change that to code since that is a valid entry

 "contributions": [
        "code"
      ]

But also, for the long term it might be nice to have an additional check in place to double check that the contributions array only holds valid values.
That way if a user tries to contribute to the guestbook manually with an invalid value, then the check will catch that.

Steps to reproduce

  1. got the guestbook repo locally
  2. pull down the latest changes from main
  3. create a new branch
  4. run the npm run contributors:add command
  5. see the error

Browsers

No response

Additional context (Is this in dev or production?)

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Contributing Docs

  • I agree to follow this project's Contribution Docs
@jdwilkin4 jdwilkin4 added the 🐛 bug Something isn't working label Oct 25, 2023
@jdwilkin4
Copy link
Contributor Author

it looks like this error also affects the generate command to

Screenshot 2023-10-25 at 12 29 19 PM

@CBID2
Copy link
Contributor

CBID2 commented Oct 25, 2023

Hey @jdwilkin4. Have you checked this locally?

@jdwilkin4
Copy link
Contributor Author

yes, I have included screenshots in the post above 👍

@jdwilkin4
Copy link
Contributor Author

Here is the PR that triggered it

#153

Here is the line that needs to be changed
https://github.com/open-sauced/guestbook/blob/main/.all-contributorsrc#L1110

@adiati98
Copy link
Member

Hey @jdwilkin4,
Thank you for spotting the bug!

I've tried it locally, and yes. It seems that this was a manual entry. And "web development" is not included in the list of emoji key and contribution type.

The solution is precisely what you described, by replacing the "web development" with "code".

And thanks for the suggestion to have the additional check. We will take that into account. :)

Do you want to work on this issue?

@jdwilkin4
Copy link
Contributor Author

@adiati98

Sure, I can create a PR for that fix 👍

@adiati98
Copy link
Member

Awesome! Thank you, @jdwilkin4!

@BekahHW
Copy link
Member

BekahHW commented Oct 25, 2023

Thanks, @jdwilkin4!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
4 participants