MyGitHubAssistant is a Python-based application designed to manage various aspects of your GitHub account using Selenium for automation and OpenAI's ChatGPT API for dynamic interactions with the GitHub interface. This tool helps you manage followers, like projects, monitor activity, and gain insights into your repositories.
- Follow/Unfollow Users: Automatically follow or unfollow users based on specified criteria.
- Like Projects: Automatically like repositories based on specific criteria, such as most starred or particular topics.
- Activity Monitor: Track and report on your GitHub activity.
- Project Insights: Analyze and report on the popularity and contributions of your repositories.
- Dynamic Interaction: Use ChatGPT API to identify HTML components dynamically, making the automation robust against changes in GitHub's interface.
MyGitHubAssistant/
├── README.md
├── requirements.txt
├── .gitignore
├── config/
│ ├── config.yaml
├── data/
│ └── cookies/
├── docs/
│ ├── architecture.md
│ ├── usage.md
│ └── api.md
├── src/
│ ├── __init__.py
│ ├── main.py
│ ├── auth.py
│ ├── github_manager.py
│ ├── chatgpt_api.py
│ ├── utils/
│ │ ├── __init__.py
│ │ ├── selenium_utils.py
│ │ ├── github_utils.py
│ │ ├── chatgpt_utils.py
│ └── constants.py
├── tests/
│ ├── __init__.py
│ ├── test_auth.py
│ ├── test_github_manager.py
│ ├── test_chatgpt_api.py
│ ├── utils/
│ │ ├── __init__.py
│ │ ├── test_selenium_utils.py
│ │ ├── test_github_utils.py
│ │ ├── test_chatgpt_utils.py
└── scripts/
├── setup.py
├── start.py
├── follow_unfollow.py
└── like_projects.py
-
Clone the repository:
git clone https://github.com/yourusername/MyGitHubAssistant.git cd MyGitHubAssistant
-
Create and activate a virtual environment:
python3 -m venv venv source venv/bin/activate
-
Install the dependencies:
pip install -r requirements.txt
-
Set up environment variables:
Create a
.env
file in the root directory:GITHUB_USERNAME=your_github_username
-
Create the
config.yaml
file in theconfig
directory with your ChatGPT API key:github: username: YOUR_GITHUB_USERNAME chatgpt: api_key: YOUR_CHATGPT_API_KEY
-
Run the application:
python src/main.py
-
Follow/Unfollow Users:
Use the
follow_unfollow.py
script to manage followers:python scripts/follow_unfollow.py
-
Like Projects:
Use the
like_projects.py
script to like repositories:python scripts/like_projects.py
- config/config.yaml: Stores configuration settings like ChatGPT API key.
- .env: Stores environment variables like GitHub username.
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Commit your changes (
git commit -m 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Create a new Pull Request.
This project is licensed under the MIT License. See the LICENSE file for details.
- Selenium for browser automation.
- OpenAI for the ChatGPT API.
- PyYAML for YAML parsing.
- python-dotenv for managing environment variables.