-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Build a bot #58
Comments
Note: I think that it would only work if the comment/issue came from someone with commit rights, or if the bot responded with: "Awaiting committer approval" and a committer could respond with: "Approved" or something 👍 |
Huh! Sounds fantastic, yea! 🎉 |
@kentcdodds let me give this idea a spin over the weekend. I like building bots and shizz. 👻 |
I recently wrote a tutorial about creating a github app: https://github.com/gr2m/github-app-example. Together with glitch you can get one going in no time, it’s amazingly simple. Holler if you have any questions |
Thank you @karanjthakkar and @gr2m! @karanjthakkar, can't wait to hear how it goes 🎉 |
@kentcdodds I made like a really quick flowchart thingy to articulate how I understand the flow for this entire implementation: https://docs.google.com/drawings/d/1D488z_lG-6U9RFFvh1WnXKt7vziP02UGgUf42I49UKw/ I'd love to hear what you think before I go ahead and make something 🙈 |
Sounds perfect! Thanks! |
Maybe this is something for later, but I’d love if a comment from a non-commiter mentioning @AllContributorsBot would end up in a pull-request instead of a direct change :) I’m really excited for this, my offer stands to help with building the actual bot. I’ll absolutely evaluate to add it to the @hoodiehq community |
Whelp, I've given it some time and this is as far as I got: https://glitch.com/edit/#!/time-discovery The test repo is here: https://github.com/kentcdodds/temp and the issue I'm using right now is here: kentcdodds/temp#1 I'm stuck at the part where the bot needs to push the Help is appreciated! |
@kentcdodds I'm assuming the private key in the glitch project is for https://github.com/apps/welcome-bot-kentcdodds-test Can you try adding it to collaborators for https://github.com/kentcdodds/temp and see if the push works after that? |
@kentcdodds I’d be happy to help you out! You should absolutely check out https://probot.github.io, it will make your life so much easier. It gives you a node-github instance which is pre-authenticated as the bot, so as long as you gave the github app the right permissions to update content on the repo and enabled webhooks for issue_comments, it should all just work. Here is an example bot I wrote with probot: https://github.com/gr2m/wip-bot. If you like we can pair on this a bit tomorrow? |
Thank you @gr2m! My glitch is actually using probot (based on your wonderful tutorial!). The problem is I don't think there's a way to make a commit and push it to a branch on a repo via the GitHub API (at least I couldn't find one), so I'm using raw git commands instead (take a look at the glitch, it's pretty simple). The problem is when I run the git push command. I won't be available to pair tomorrow, but maybe the next day? 😀 |
@kentcdodds, i can't find it too, but it should totally possible, because Renovate is using APIs (GitLab's and Github's) to do that. And probably GK works that way too. |
Oh I do that all the time :) For example, see these lines here: https://github.com/octokit/fixtures/blob/master/lib/notify-about-fixtures-changes.js#L84-L103. It creates a branch, on that branch it creates a few files (which also creates a commit) and then creates a pull request for that branch. See the create/update file APIs at https://developer.github.com/v3/repos/contents/ |
@kentcdodds @gr2m I want this to exist! Is there a way I can hop in and help out? Or even take the ball and run with it if y'all aren't actively pursuing this? LMK, thanks 💚 |
Yes, if you want to build this yourself, please do! |
go for it @jerodsanto, happy to help out with GitHub API / App / Probot questions |
Does someone have a bot in progress? I'd be happy to help out with an existing one if there is, or start work on one myself if there is no work in progress. |
just do it :) |
See @sokra's openbot |
@TheLarkInn I wasn't able to find that on their profile; can you link to it? |
@RichardLitt, it is @open-bot I suppose? |
Ahh yes that is it. I was trying to go by memory!
…On Thu, Mar 22, 2018 at 9:07 PM Charlike Mike Reagent < ***@***.***> wrote:
@RichardLitt <https://github.com/richardlitt>, it is @open-bot
<https://github.com/open-bot> is suppose?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#58 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADQBMDSvme1tC879oLN2SmgoV5xrJeujks5thHUCgaJpZM4OUaEB>
.
|
Love this idea. Just a heads up, about a story I read lately: If I'm understanding intent in this issue correctly, the idea is to have the bot take action when a config file is present? If so, a config file existing might not be enough to assume consent (through GitHub's ToS) to have a bot post in the repo. Might need a default flag for |
@patcon you would build this as a GitHub app, the consent would be that the a repository maintainer would install the GitHub app :) There are some folks interested in building this using Probot (a GitHub app framework) over at probot/ideas#46 |
2K+ now. Anyone started something? |
That is 🤯 I have no plans to work on this personally. But it would be cool! |
It seems the |
@jakebolam It's not mine. I believe it was already taken when I looked into it over a year ago: #58 (comment). |
Thanks @tech4him1. I've got around this for now and I'm starting to make some progress https://github.com/all-contributors/all-contributors-bot |
How's the progress in that? |
Hey @Berkmann18. Progress is coming along nicely. The bot posted it's first PRs today: I've started providing updates on this issue: all-contributors/app#5 It would be great to get help! I think it should be at a point where you can start looking through the code/issues. We are currently fairly blocked on the v8 release of probot (all-contributors/app#7) |
@jakebolam So essentially this issue depends on all-contributors-bot#5 which depends on all-contributors-bot#7 which depends on probot#774; in other words, holding this one until probot updates their |
Yes that's correct, so some of the other issues can be worked on (I've just been using unit tests/TDD on them). I can link them all here tomorrow if you like (on the phone right now). One that comes to mind is the NLP stuff like: all-contributors/app#15 |
@jakebolam Sure, I'm no expert in making probots or NLP (although I'm eager to learn/improve in both) but I'll have a look at the NLP one. |
I’m optimistic that we will be able to release |
@gr2m awesome news! |
I didn’t quite finish the
If you run into any problems check out the change notes here: probot/probot#774 (comment) Thanks! |
https://github.com/all-contributors/all-contributors-bot is running a preview version of probot, and things are looking good. Development is unblocked! |
@all-contributors please add tbenning for design |
I've put up a pull request to add @tbenning! 🎉 |
Bot is awesome. Is it complete? |
It's got most features, just working on polishing now. Feel free to start promoting it! |
I think it's clear that there's interest in the
all-contributors
spec. There are 259.all-contributorsrc
files on GitHub!I think that even more people would receive the gratitude they deserve if we had a bot to automate things for us. My vision is I could open an issue or even comment on an issue or pull request with something like:
And magic would happen. Anyone wanna do this?!?!?!
The text was updated successfully, but these errors were encountered: