intelowlproject / IntelOwl

IntelOwl: manage your Threat Intelligence at scale
https://intelowlproject.github.io
GNU Affero General Public License v3.0
3.83k stars 437 forks source link

Auto Twitter Post On release #1825

Open mlodic opened 1 year ago

mlodic commented 1 year ago

The actual Github Action is not working anymore. We should migrate to v2 APIs of Twitter

shivam-Purohit commented 1 year ago

Hey, @mlodic can I take a look at this?

mlodic commented 1 year ago

sure!

shivam-Purohit commented 1 year ago

I dont think they have updated to the newer version of Twitter API. Should we search for other options? Like other actions? Or some manual way to do it

mlodic commented 1 year ago

nope they don't. Right now there is almost nothing in the community regarding v2 of Twitter APIs because most of those APIs requires payment. However, it is free to publish a post so that integration could be done. It would be cool to create a new Github Action and publish it, I guess a lot of people could leverage it

shivam-Purohit commented 1 year ago

Seems good! I will look more into how to publish Github Actions.

shivam-Purohit commented 1 year ago

According to the docs we need to have a separate repository for the individual action.

I was thinking of using tweepy. It makes it lot easier to interact with the twitter API. I tested it with my own account for posting and it's working fine. Should we add a script to interact with the API and use that in the yml? Is this how we could approach this?

shivam-Purohit commented 1 year ago

I was thinking of using tweepy. It makes it lot easier to interact with the twitter API.

seems unnecessary to install a library for a single task. It would make the action slower. We would directly interact with the API.

mlodic commented 1 year ago

hey,

seems unnecessary to install a library for a single task. It would make the action slower. We would directly interact with the API.

Yeah but consider that this API will be executed rarely, only once the release is created. So it's not a real problem. If that library works and makes things easier, you can try to use it

shivam-Purohit commented 1 year ago

How do I approach this? I have a sample script ready and the actions sample code is also available. But we need a separate repo. Can you create a repo? and I will pull a draft PR for that.

shivam-Purohit commented 1 year ago

hey @mlodic, was it incorrect ? should I work on this or not ?

mlodic commented 1 year ago

sorry, I created the repo: https://github.com/intelowlproject/twitter_post

shivam-Purohit commented 1 year ago

thanks, I will try to push some draft code there this week.

shivam-Purohit commented 1 year ago

@mlodic I have pushed some new changes. Can you have a look?