- Overview
- Prerequisites
- File Structure
- Setup
- Usage
- Enhancements and Customizations
- Contributing
- Reporting Bugs
- Future Enhancements
- License
These scripts automate the process of pushing changes to a GitHub repository, creating a pull request, and merging it automatically. They support Python, Bash, PowerShell, and Batch scripts.
- GitHub Personal Access Token (PAT) with necessary permissions.
- Python 3.x installed for the Python script.
requests
andpython-dotenv
Python packages (install viarequirements.txt
).
project/
├── auto_push_to_github.py
├── auto_push_to_github.sh
├── auto_push_to_github.ps1
├── auto_push_to_github.bat
├── requirements.txt
└── .env
- Clone the repository.
- Navigate to the
project
directory. - Create a
.env
file in the root directory with the following content:
GITHUB_TOKEN=your_github_pat
- Install the required Python packages:
pip install -r requirements.txt
- Navigate to the
project
directory. - Run the Python script:
python auto_push_to_github.py
- Follow the prompts to enter the necessary information (repository owner, repository name, file paths to push, commit message, etc.).
- Navigate to the
project
directory. - Run the Bash script:
bash auto_push_to_github.sh
- Follow the prompts to enter the necessary information (repository owner, repository name, file paths to push, commit message, etc.).
- Navigate to the
project
directory. - Run the PowerShell script:
.\auto_push_to_github.ps1
- Follow the prompts to enter the necessary information (repository owner, repository name, file paths to push, commit message, etc.).
- Navigate to the
project
directory. - Run the Batch script:
auto_push_to_github.bat
- Follow the prompts to enter the necessary information (repository owner, repository name, file paths to push, commit message, etc.).
- Branch Name: The default branch name is
automated-branch
. You can customize this by entering a different name when prompted. - File Paths: Specify the paths of the files you want to push to the repository.
- Commit Message: Provide a meaningful commit message for the changes.
- Logging: All scripts include logging to track the progress and errors. You can modify the logging level and format as needed.
- Handling Multiple Files: Modify the scripts to handle multiple files if required.
- Settings Profiles: Save and load settings profiles to reuse configurations.
- Help Section: Access a help section with a menu for selecting options and settings.
- 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 pull request.
If you encounter any bugs, please open an issue in the repository with detailed information about the problem.
- Add support for handling multiple files.
- Implement additional error checks and validation.
- Extend the scripts to support more complex workflows and integrations.
- Include functionality to prompt users to like the repository before forking.
- Add popular badges to the README.md file.
This project is licensed under the MIT License.