ideas icon indicating copy to clipboard operation
ideas copied to clipboard

Twitter Integration

Open agbilotia1998 opened this issue 7 years ago • 24 comments

This idea is #- 5 proposed for GSOC 2018

Use GitHub’s Pull Requests & Reviews to collaborate on a shared twitter account. Tweets are simply files in a repository. The GItHub app would enforce the character limit by setting a pull request status. Tweets could be allowed to be scheduled or be queued based on a configured tweet schedule

I would like to work on this.

agbilotia1998 avatar Feb 13 '18 08:02 agbilotia1998

Cool idea!

What would happen if the files were edited after the tweet was posted?

j-f1 avatar Feb 13 '18 11:02 j-f1

We can create a new tweet or add a tweet to the previous one or just delete the previous one and tweet the modified file.

Any further suggestions are welcomed!As I have not yet modelled the implementation part.

agbilotia1998 avatar Feb 13 '18 12:02 agbilotia1998

@gr2m can you please elaborate more on this?

agbilotia1998 avatar Feb 13 '18 17:02 agbilotia1998

I would follow what Twitter is doing: do not allow to edit a tweet. Once tweeted, the GitHub app could set CI status to false with an explanation.

What we could do is to support deletion, as twitter has support for that, too?

gr2m avatar Feb 13 '18 18:02 gr2m

Okay @gr2m thanks! I will start working on this.

agbilotia1998 avatar Feb 13 '18 18:02 agbilotia1998

@agbilotia1998 awesome :) Note that we would like to reserve this idea for Summer of Code applicants, so please don't share your code publicly. But if you have clarifying questions, feel free to comment here.

I will clarify this in the issues with the summer of code label

gr2m avatar Feb 13 '18 18:02 gr2m

Okay @gr2m :)

agbilotia1998 avatar Feb 13 '18 18:02 agbilotia1998

Hi @gr2m I would like to work on this for Summer of Code.

itaditya avatar Feb 14 '18 10:02 itaditya

@gr2m I have sent you the invite link of the repository on which I am implementing this idea.Please accept it and monitor the progress and give some suggestions.Also please open issues on same repository regarding the functionalities that are to be added.

agbilotia1998 avatar Feb 14 '18 11:02 agbilotia1998

@agbilotia1998 sorry I can't give 1:1 feedback due to workload. Let's discuss questions to clarify the scope here so everyone can benefit.

@itaditya no need to ask for permission :) Everyone who wants to can use that idea to submit it to GSoC

gr2m avatar Feb 15 '18 04:02 gr2m

Oh ok, so will you accept multiple interns for the same idea? @gr2m

itaditya avatar Feb 15 '18 05:02 itaditya

if the applications are great, of course :)

gr2m avatar Feb 15 '18 18:02 gr2m

Hi! :) I would also like to work on this. @agbilotia1998 can you invite me too to contribute?

clarammdantas avatar Feb 20 '18 01:02 clarammdantas

y'all can all use the idea for your submissions to Google Summer of Code & Rails Girls Summer of Code :)

gr2m avatar Feb 20 '18 01:02 gr2m

I haven’t looked into it in detail but that project sounds like it might be related: https://github.com/mozillach/gh-projects-content-queue

GitHub
gh-projects-content-queue - A Twitter content curation queue based on GitHub projects.

gr2m avatar Mar 07 '18 02:03 gr2m

The project sounds similar. And gives us ideas of some more features that one can work out while working on this project.

However, The project appears to be Mozilla (Possibly mozillach) only so far. (See Features>Bullet No. 10).

Here's a issue Be a GitHub Integration #77, where I guess, they thought of making it a GitHub Integration (Now, called GitHub Application), but they think that it's suitable for Mozilla only. (It would have been really cool if they built it as a GitHub App, though issue is still open. 😉 )

Here's another issue: Use GitHub Webhooks #76. Currently, it seems that there application currently uses polling to refresh data, and they want to migrate there application to GitHub Webhooks.

If we use Probot, then we will directly be depended and using GitHub Events. The app will be ready to be published in the GitHub Marketplace. 🎉

I liked the idea, and starred it, but I think implementation of this idea will be convenient, when built with Probot. 😄

Possibly, Mozilla will ditch their application, and will start using this when this app reaches GitHub Marketplace. 😉

abhijeetps avatar Mar 07 '18 04:03 abhijeetps

@gr2m Can you please elaborate this "Tweets are simply files in a repository", not able to get that.

iamgrawal avatar Mar 18 '18 12:03 iamgrawal

The way it could be built is that all tweets are actual files in the repository. Say there is a "tweets" folder. If you want to send out a tweet you create a pull request adding a new file with the tweet to that folder. The app could use the status API to set the status to error if the text is too long for example. Once it’s approved & merged, the app could tweet out using the configured twitter account, and maybe amend the file with a link to tweet for future reference.

For comparison, I’m working on a link sharing app backed by a GitHub repository. See https://octonews.org/. All the posts you see are files in this folder: https://github.com/octonews/octonews/tree/master/_data/news. And similar to octonews.org, the twitter app could also have a custom UI so people wouldn’t even need to use github.com but instead have a custom form that gives direct feedback e.g. if the tweet is too long, but uses the repository as its "database" and review system

gr2m avatar Mar 18 '18 18:03 gr2m

Hey @gr2m , from this, what I think is that the bot is making scheduled tweets. Do we have to make it tweet events at some schedule or immediate when an event occurs on the GitHub repository? Also, is storing the tweets in the file necessary? Because, when we are tweeting something, the tweet might be already published to the Twitter, and the best that we can do is to add a comment by the bot with a URL to the tweet. What you say?

abhijeetps avatar Mar 18 '18 21:03 abhijeetps

Do we have to make it tweet events at some schedule or immediate when an event occurs on the GitHub repository?

I would suggest to start out with tweeting directly. Scheduling would be a great feature to add in a later iteration

Also, is storing the tweets in the file necessary? Because, when we are tweeting something, the tweet might be already published to the Twitter, and the best that we can do is to add a comment by the bot with a URL to the tweet.

I’m not sure what you mean? The workflow I imagine is to create a new file with a pull request, the pull request can be analysed by the bot and when merged, tweeted out. So the flow would be

  1. Open pull request with new file for tweet
  2. Merge pull request
  3. New tweet posted by app

gr2m avatar Mar 18 '18 22:03 gr2m

Hey @gr2m, what would be better? Creating a new YAML files for each tweets or appending all tweets in a single file named tweet.yml?

abhijeetps avatar Mar 21 '18 01:03 abhijeetps

I’d make separate tweets. This will avoid conflicts if people work on drafts for multiple tweets at once

gr2m avatar Mar 21 '18 04:03 gr2m

I would like to work on this. @gr2m can I join in this idea?

Iphytech avatar Mar 25 '18 16:03 Iphytech

@Iphytech , the idea is open for everyone for this GSoC. Anyone can submit proposals idea labelled with summer-of-code. Please see this comment: https://github.com/probot/ideas/issues/32#issuecomment-366839329

abhijeetps avatar Mar 25 '18 16:03 abhijeetps