freeCodeCamp / 100DaysOfCode-twitter-bot

Twitter bot for #100DaysOfCode
https://twitter.com/_100DaysOfCode
BSD 3-Clause "New" or "Revised" License
282 stars 110 forks source link

Removes redundant config files and check for one hashtag #150

Closed amandeepmittal closed 2 years ago

amandeepmittal commented 2 years ago

Change proposed in this pull request:

amandeepmittal commented 2 years ago

@raisedadead, as per the discussion with @QuincyLarson, can you please review the PR.

Also, do you want me to include the Twitter API keys in the PR? Currently, it doesn't. Before deploying, you will need those keys.

raisedadead commented 2 years ago

Hi @amandeepmittal

Thanks for these changes. I will get back to you with a review as soon as I am able. Thanks for your patience :)

do you want me to include the Twitter API keys in the PR?

This repository is public, we certainly do not want any keys in public.

amandeepmittal commented 2 years ago

@raisedadead, apologies for pinging you again but if you get time in coming days/weeks, please have a look at this PR 🙏 And thanks a lot once again, it is always a pleasure to work with you and freeCodeCamp team on this 😄

raisedadead commented 2 years ago

Hi @amandeepmittal

Sorry about the delayed response on this. This PR is not forgotten, it's just that we haven't gotten around to looking at the codebase and how it's all set up on Heroku yet.

But the good news is @zairahira from our staff team will be overseeing this.

In the interest of time would it be possible for you to get on a quick 15-minute call sometime this week, and give us a basic walkthru?

If yes, let me know I will DM you on Twitter.

amandeepmittal commented 2 years ago

Thank you @raisedadead! Quincy introduced us on Twitter and I am in touch with Zaira! Will take it forward from there.

raisedadead commented 2 years ago

I am going to go ahead and merge this. @zairahira once this is merged I will add some setup files for GitPod for easier development setup. @amandeepmittal we would appreciate some help with understanding how this is deployed.

amandeepmittal commented 2 years ago

@raisedadead, it is deployed manually by logging into Heroku console from CLI and then run the command. You can change deployment process in whatever way you think is appropriate. I am pretty sure things have changed for the better with Heroku nowadays.

amandeepmittal commented 2 years ago

The only thing to take notice of when deploying a nodejs script on Heroku is to have Procfile at the root of the project with the following value:

worker: node index.js

And then in heroku project dashboard, enable worker. I don't where that setting might live nowadays, since I can't login into any of m personal heroku account (I tried contacting their support but still awaiting a resolution).

raisedadead commented 2 years ago

Hi @amandeepmittal

Yeah - I linked the GitHub repo to Heroku and we added the keys to the environment variables, So I think the deployments are now automated.

Now, I am not sure if the issue of spam retweets needs additional code changes because we are still seeing the bot retweeting unwanted tweets.