up-for-grabs / up-for-grabs.net

This is a list of projects which have curated tasks specifically for new contributors. These issues are a great way to get started with a project, or to help share the load of working on open source projects. Jump in!
https://up-for-grabs.net/
Other
5.25k stars 2.01k forks source link

Automatically post projects from up for grabs to /r/RepositoryRequest #448

Open DandyDeveloper opened 7 years ago

DandyDeveloper commented 7 years ago

I'm not even sure how feasible this is but I'm going to look into it.

I created a new subreddit with the purpose of achieving what up for grabs does. The subreddit is here:

https://www.reddit.com/r/RepositoryRequest

It took of a little more then I expected (I actually expected just a few newbie developers interested), but its' already started to gain traction and I think the introduction of an autopost from the up for grabs project would be absolutely ideal.

I'm going to start the ball rolling on how. Would be nice to get some suggestions from anyone on how this might be achievable.

shiftkey commented 7 years ago

I think the introduction of an autopost from the up for grabs project would be absolutely ideal.

What exactly do you need from one of the curators?

If you're interested in knowing when new projects are added I could enable a webhook on this repository to report when pull requests change - you could look for when the pull request is merged and grab the details from the file.

dahlbyk commented 7 years ago

A PR webhook is a good option. You would want to look at the PR diff to check for new files added to _data/projects.

If you wanted to take that a step further, you could periodically scan all the projects listed and check for new issues with the specified label since your last scan. This would let you periodically resurface projects that continue to add new issues. We haven't built any such tracking infrastructure for the main site, but we're approaching the limits of what we can do with a static site that lacks a back-end service.

If you decide to move ahead with a webhook handler, we'd be glad to host it in a repo in this org.

DandyDeveloper commented 7 years ago

I'd definitely like to do something along those lines, this would also allow me to create something using a language I'm familiar with, without bothering you.

I'd like to get the ball rolling this weekend, as I'm currently busy with other projects & work.

Do you need anything from me at this point to get started? Also, thank you so much to being open to the idea, means a lot to me and I'm sure it'll mean a lot to others as well.

I hope it'll give your platform a little more attention too!

dahlbyk commented 7 years ago

Do you need anything from me at this point to get started?

Not really. I've added you as an admin on https://github.com/up-for-grabs/reddit-bot; feel free to rename with something clever. Since we've simply hosted with GitHub Pages, we don't really have any opinions on platform, host, etc. (beyond free, given that we are unsponsored :grinning:). Once you get to the point that you'd like to start receiving web hooks, give us a URL and we will get you set up.

brooksbecton commented 7 years ago

Hey! I'm new to helping with issues on Github, but I would really like to hop on this. I'm familiar with python so we can use reddits bot library to listen for the web hooks and make the posts.

DandyDeveloper commented 7 years ago

@dahlbyk What kind of events am I going to be looking for? Never used a web hook within Github, so I'm not sure what kind event I'll need to perform.

shiftkey commented 7 years ago

@DandyDeveloper the webhook is a request that GitHub sends to a given URL (in this case, a web server you've hosted somewhere). It will contain some JSON describing the event that just happened, and the state of the pull request.

Here's an example payload of the PR: https://developer.github.com/v3/activity/events/types/#pullrequestevent

Looking at the contents of pull_request, I don't think you'll have access to the files inside the pull request at that point - so you'll need to make some requests to the API to get the data you need.

Here's a flow I'm writing off the top of my head (not sure what you need for this, feel free to adapt it or ignore it):

shiftkey commented 7 years ago

Closing this out to get this off our plate, but please feel free to update this issue @DandyDeveloper if you have anythign cool to share!

DandyDeveloper commented 6 years ago

@shiftkey Finally getting time to do this and have the Reddit API side of this sorted.

Still happy with me using the PullRequestEvent for posting these or do you have an up for grabs endpoint I could use (or, one that I could create)?

I'll test whether I can access the PullRequestEvent if we don't have an event and get back to you if I need some permissions set up.

Last question: Still happy for me to implement this? Despite the amount of time, I think RedditRequest is still a great way to get people visibility of new projects on Up For Grabs and I'm now in a position to create it (shouldn't take me long either).

shiftkey commented 6 years ago

Still happy with me using the PullRequestEvent for posting these or do you have an up for grabs endpoint I could use (or, one that I could create)?

We don't have an official endpoint. Using the official GitHub API is :gem:.

I'll test whether I can access the PullRequestEvent if we don't have an event and get back to you if I need some permissions set up.

Please let me know if you have issues. Happy to help.

Still happy for me to implement this?

Yes!

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.