all-contributors / app

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

[Feature] add support for GitHub discussions #442

Open brylie opened 1 year ago

brylie commented 1 year ago

Now that GitHub discussions are widely available, many projects are using GitHub discussions for community engagement. There will often be discussion threads for things like ideas and support.

To quickly credit active contributors in various community discussions, It would be helpful if the All Contributors bot would also listen for @mentions in GitHub Discussions.

An alternative would be to move discussions to issues when we want to mention the All Contributors bot. However, this may cause unnecessary noise and clutter since GitHub currently only allows us to create a new issue from an existing discussion.

tenshiAMD commented 1 year ago

@brylie thanks for bringing this up. I think we can enable GH discussion in the future however I think we like to simply things out. @all-contributors/core what do you think?

darshitac11 commented 1 year ago

@brylie - thanks for raising this. I have similar requirement for my project.

Currently as a workaround, we have created one issue where we link to a relevant contribution in discussions and evoke the All Contributors bot. It is less messy than converting each relevant discussion to an issue but still not ideal.

Reference: https://github.com/Atri-Labs/atrilabs-engine/issues/332

brylie commented 1 year ago

Thanks, @darshitac11! That's a great idea :sunglasses:

Relatedly, I understand that All Contributors may not immediately, or ever, get this feature. However, I hope the issue will remain open as a placeholder for the possibility of being added.

darshitac11 commented 1 year ago

Thanks @brylie!

Yes, I appreciate that you requested this feature. I'm sure many projects would love to use it whenever it is available. 💙

gr2m commented 1 year ago

@all-contributors/core what do you think?

I think it's within the scope of the app. I think we should transfer this issue to https://github.com/all-contributors/app. We will probably need to add a permission to the app in order to enable interacting with discussions

tenshiAMD commented 1 year ago

We will probably need to add a permission to the app in order to enable interacting with discussions

@gr2m great! shall we add now?

gr2m commented 1 year ago

okay, I requested the read/write permission to discussions. Note current installations are not updated until the request is accepted by account owners. That means we have to account for the case that an installation might have the permission to read/write discussions or comments. I think this shouldn't be a problem in our case, because we would only interact with discussions when handling a discussion_comment event, which we will only receive if the owner accepted the permission.

Let me know if you have any questions.

I did not yet subscribe the app to the discussion_comment event. We can do that once we implement the functionality

n13 commented 1 year ago

I just got a request to enable this

What I don't understand about any of these permissions is why AllContributors needs write access to anything?

Read access should be sufficient.

What you wanna write to our discussions?

I think this opens the door to security holes and bugs, and I am not going to approve that permission.

I am actually thinking to disable AllContributors. It's cool, but I don't like it having write access to everything. If this gets hacked it can really mess up all our repos. So... why???

gr2m commented 1 year ago

write access

in this context write access means it needs to be able to comment. There is not a more granular permission in order to write comments, you need full write access to all discussions.

and I am not going to approve that permission

You already approved it for repository contents, issues, and pull requests, but you do you 🤷🏼

I am actually thinking to disable AllContributors. It's cool, but I don't like it having write access to everything. If this gets hacked it can really mess up all our repos. So... why???

you don't need the app, you can probably set up your own automation using the CLI, the app is just for convenience and to lower the technical barrier to less technical users.

Reducing permissions is off topic for this issue, please open a separate discussion if you want to continue on that topic.