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

feat: don't create PR when contributor already have contribution type #346

Merged
merged 2 commits into from
Mar 4, 2021
Merged

feat: don't create PR when contributor already have contribution type #346

merged 2 commits into from
Mar 4, 2021

Conversation

rluvaton
Copy link
Contributor

@rluvaton rluvaton commented Mar 4, 2021

Closes #345

@vercel
Copy link

vercel bot commented Mar 4, 2021

@rluvaton is attempting to deploy a commit to the All Contributors Team on Vercel.

A member of the Team first needs to authorize it.

lib/modules/config.js Outdated Show resolved Hide resolved
@vercel
Copy link

vercel bot commented Mar 4, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/all-contributors/app/FGVNmUvjjNbW2pYpNkDkon9upuJp
✅ Preview: https://app-git-fork-rluvaton-feat-dont-create-pr-whe-73fef0.vercel.app

@gr2m
Copy link
Contributor

gr2m commented Mar 4, 2021

@rluvaton I've deployed your update as preview to Vercel and updated https://github.com/apps/all-contributors-preview to point to that deployment. Can you install https://github.com/apps/all-contributors-preview on a test repository and see if it resolves your problem? Make sure that you don't have both https://github.com/apps/allcontributors and https://github.com/apps/all-contributors-preview installed on the same repository, otherwise the two will conflict with each other

@rluvaton
Copy link
Contributor Author

rluvaton commented Mar 4, 2021

@gr2m I installed it and it doesn't respond to any of my comments.
Is there a way to debug it?

@gr2m
Copy link
Contributor

gr2m commented Mar 4, 2021

Here is what I see in the logs

image

It might be that the private class field is not supported by the node version used by Vercel

@rluvaton
Copy link
Contributor Author

rluvaton commented Mar 4, 2021

Thank you for your help, I fixed it

@gr2m
Copy link
Contributor

gr2m commented Mar 4, 2021

can you try again

@rluvaton
Copy link
Contributor Author

rluvaton commented Mar 4, 2021

@gr2m Work like a charm!

My tests: https://github.com/rluvaton/all-contributor-playground/pull/5

Copy link
Contributor

@gr2m gr2m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, thank you 👏🏼

@gr2m gr2m merged commit 69ec49a into all-contributors:master Mar 4, 2021
@rluvaton rluvaton deleted the feat/dont-create-pr-when-there-is-no-need-345 branch March 4, 2021 20:13
@github-actions
Copy link

github-actions bot commented Mar 4, 2021

🎉 This PR is included in version 1.13.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@rluvaton
Copy link
Contributor Author

rluvaton commented Mar 4, 2021

@gr2m Don't forget to add me as a contributor 😉 😉

@gr2m
Copy link
Contributor

gr2m commented Mar 4, 2021

haha I just waited for the new deployment to finish so I could test the changes in production :D

@all-contributors please add @rluvaton for code, bug

@allcontributors
Copy link
Contributor

@gr2m

I've put up a pull request to add @rluvaton! 🎉

@ouuan
Copy link
Contributor

ouuan commented Jun 9, 2021

I used to use the old behavior to update the README. Now how do I update README without adding a new contributor/contribution type?

@rluvaton
Copy link
Contributor Author

rluvaton commented Jun 9, 2021

I'm having a hard time to understand 😬, what do you mean by:

I used to use the old behavior to update the README.

Update with what changes?

@ouuan
Copy link
Contributor

ouuan commented Jun 9, 2021

Update with what changes?

For example, manual changes of .all-contributorsrc.

@ouuan
Copy link
Contributor

ouuan commented Jun 9, 2021

It was a workaround of #157.

@rluvaton
Copy link
Contributor Author

rluvaton commented Jun 9, 2021

And you want your manual change to update the README?

@ouuan
Copy link
Contributor

ouuan commented Jun 9, 2021

I think the best solution is to implement what #157 requests.

@rluvaton
Copy link
Contributor Author

rluvaton commented Jun 9, 2021

I see, I'm a little bit busy at the moment so I won't be able to create a PR, but you're more than welcome 🤗 , I'll try to help you;

From what I understand from the code, you need to add the action here:

if (action !== "add") {

Extract the code after to an add function

Add the action to here:

if (action === "add") {

Take some of the code from here:

const contentFiles = new ContentFiles({

And I think that's it 😅

@brosaplanella
Copy link

I have noticed that if the bot is asked to add a contributor for a given contribution and the PR is not merged, when asked again the bot says that the user has already contributed before to that aspect. Is this the intended behaviour or is this a bug?

@rluvaton
Copy link
Contributor Author

I think you should open a new issue and reference this and I try to answer it there

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

Successfully merging this pull request may close these issues.

Don’t create PR when contributor is already exist
4 participants