Build a bot to collect data from Git
- A Bot (not for Discord)
- It will run every week/month
- It will check all the repositories for the organization (with Github GraphQL) for the most amount of PR for a single contributor
- Create an image for that person and it will post it to Twitter and Discord
- Create a docker
- GITHUB_ORG_NAME
- GITHUB_TOKEN
- TWITTER_TOKEN
- DISCORD_HOOK
Should follow:
- A picture of the organization owning the repo
- A text with the name of the organization on the picture
- A Picture of the contributor
- A text about the contributor achievement (in the picture)
- A text about the contributor (in the tweet)
- As much as information as possible on the contributor
- Awesome design gets extra points
Bonuses
- Add more things like most amount of issues, most amount of reviews and so on.
- Write docs
- How to run?
- How to contribute?
- Write the Makefile?
- Welcome new comers
- Set Git hooks dir
- Install cocogitto tools for standardizing commits
- Write REQUIREMENTS
- Change the project name
- From
git-stats-bot
todev-works-logger
- From
- Refactor folder structure
- +-- main.rs
- +-- modules
- +---- git
- +------ mod.rs
- +------ models
- +-------- mod.rs
- +-------- module1.rs
- +-------- module2.rs
- +---- discord
- +------ mod.rs
- +------ models
- +-------- mod.rs
- +-------- module1.rs
- +-------- module2.rs
- +-- utils
- +---- init
- +------ mod.rs
- Manage env variables with
dotenv
- Fetch data from GraphQL Github with gql_client
- Research GraphQL
- Get all recent commits of a repo
- Get all recent active repos
- Refactor: instead of using gql_client, I plan to change it to reqwest with json body
- Create my own request client
- Research about Git hooks
- Twitter API
- Auth
- Create a tweet
- Determine a template for tweet
- Title (depends on the number of CHANGED FILE to generate)
- Body
- Total commits in the day, total changed files
- Tags
- Create a function to check the tweet's length before tweeting
- Send an email related to the tweet's status (false/true)
- Discord
- Enable Github Webhook for Discord
- Discord Bot
- Research CI/CD on Github Action
- Add script to check Rust before merging PRs
- Add script to deploy Docker Image to Heroku
- Improve Deploy script
- Divide the whole script into pieces
- Remove some parts being not used
- Disable CI for now, I plan to do drive the project with another direction.
- Cronjob
- Cronjob
- Docker
- Build Docker Image
- Research
docker-compose
- Build a docker image to develop locally
- Improve Docker Image
- Create a minimal docker image
- Cron job
- ENV variables not found
- Find a way to get a github name, token on CI
- Pass env variables when building docker image on CI
- Deploy to Heroku
- Plan to deploy to another server (Heroku is not free from 28/11)
- Docker (Auto build: 5$ per month)
- GCS
- Localhost is the best choice for now, until I can find the alt.
- Send Email SMTP
- Investigate
- Implement CLI to trigger some features
- Overall configurations
- Github
- PAC
- Username
- [ ]
- Github
- Twitter commands
- Config Twitter credentials
- Switch ON/OFF feature
- Email commands
- Config Gmail credentials
-
username
,password
-
- Switch ON/OFF feature
- Config Gmail credentials
- Discord commands
- Config Discord credentials
- Switch ON/OFF feature
- Overall configurations
- Add scripts to cut down the time to deal with some dev parts
- Docker
- Build image
- Run image
- Exec image
- Push image to Docker Hub
- Release
- Changelog generator
- Development
- Run debug
- Docker
- Actix web impl (In a long-term)
- Restructure folder
- Monorepo
-
docker-compose
for building all services
- Restructure folder
- Database impl (MongoDB) (In a long-term)
- Run
Makefile
withmake -f Makefile