all-contributors / app

🤖 A GitHub App to automate acknowledging contributors to your open source projects
https://allcontributors.org
MIT License
576 stars 150 forks source link

When contributor name contains a minus sign then allcontributors loses the part after the minus sign #354

Closed aaltat closed 3 years ago

aaltat commented 3 years ago

Describe the bug If contributor name contains a minus sign, like foo-bar, then allcontributors loses the part after the minus sign. Example foo-bar comes as foo-

To Reproduce 1) When I example says: @all-contributors please add vincenzo-gasparo for code 2) Then Could not find the user vincenzo- on github.

Expected behavior Did expect user to be assed correctly.

Berkmann18 commented 3 years ago

That's odd because all-contributors/all-contributors#413 was supposedly (recently) fixed. What version of the CLI are you using?

aaltat commented 3 years ago

Interesting, our repository is using AllContributors bot.

image

Berkmann18 commented 3 years ago

Have you tried doing that with the CLI by any chance? If so, did you also got an error?

I've dug a bit deeper and this might be a regression as opposed to a bug (given that it worked for users who used the bot, although that was before it was rewritten).

aaltat commented 3 years ago

I tried from command line and from command line user name was detected correctly.

aaltat commented 3 years ago

Found the PR from our repository where the problem occurs: https://github.com/MarketSquare/robotframework-browser/issues/814#issuecomment-808869259

mtfoley commented 3 years ago

FWIW, it looks like the parsing would work if using "@olga-zm". I added a couple of tests just to see what it would do. Screen Shot 2021-05-02 at 8 47 30 AM Screen Shot 2021-05-02 at 8 49 17 AM

Berkmann18 commented 3 years ago

@mtfoley I see, feel free to submit a PR with your findings.

mtfoley commented 3 years ago

@Berkmann18 I actually think you should close the issue and @aaltat should try using the bot with username mentions in the future. The changes introduced by the merged PR #434 for all-contributors/all-contributors#413 was to update the docs to show preceding contributor username with @. I think the docs ought to go one step further and explicitly state that the bot will match the username best if preceded with @ symbol. I'll submit a PR over there.

mtfoley commented 3 years ago

See PR #525