First off, thanks for taking the time to contribute! This document explains the process and guidelines for contributing to the AI Content Generator repository.
- How Can I Contribute?
- Code Style Guidelines
- Commit Message Guidelines
- Git Workflow: Step-by-Step
- Setting Up Development Environment
If you've found a bug or have a suggestion for a new feature:
- Check existing issues to ensure it hasn’t been reported yet.
- Create a new issue and provide detailed information:
- A clear title.
- Detailed steps to reproduce the bug (if applicable).
- Any relevant screenshots or logs.
- Your environment (e.g., operating system, version of the AI Content Generator).
- Use labels like
bug
,enhancement
,question
, etc. to categorize your issue.
If you're ready to submit code to fix an issue or add a new feature:
- Fork the repository and clone it locally.
- Create a new branch from the
main
branch for your changes. - Make your changes with clear and atomic commits.
- Test your changes thoroughly.
- Push your branch to your forked repo and open a Pull Request (PR) on the original repo.
- Wait for feedback or approval from maintainers.
If you notice a typo, missing information, or outdated content in the documentation:
- Create an issue or submit a pull request directly with your changes.
- Ensure any new sections follow the existing documentation style.
To maintain consistency and readability, please follow these guidelines:
- Use consistent indentation (e.g., 4 spaces for Python).
- Ensure your code is well-documented with inline comments, especially for complex functions.
- Adhere to the project's existing coding style and conventions.
- Run linters and code formatters to avoid formatting errors.
For Python:
- Follow PEP 8 coding standards.
For JavaScript (if applicable):
- Use ESLint and format your code according to Prettier guidelines.
- Use clear, descriptive commit messages.
- Format:
- Capitalize the first letter.
- Use imperative mood ("Add feature", not "Added feature").
- Keep the commit message concise (under 72 characters).
Example:
Add support for generating multiple content types
Fix issue with AI response timeout
Update documentation for installation instructions
To contribute, first fork the repository to your own GitHub account.
- Navigate to the repository on GitHub.
- Click the
Fork
button at the top right corner. - This creates a copy of the repository under your own GitHub account.
Once forked, clone the repository to your local machine:
git clone https://github.com/<your-username>/ai-content-generator.git
cd ai-content-generator
This ensures you can sync your fork with the original repository.
git remote add upstream https://github.com/iamkanhaiyakumar/ai-content-generator.git
Always create a new branch for your contributions instead of working directly on the main
branch.
git checkout -b feature/your-feature-name
Make your changes locally. After making changes, check which files have been modified:
git status
Stage the files you’ve modified or added for commit:
git add <file-name> # To add specific files
git add . # To add all modified files
Commit your changes with a clear and descriptive message:
git commit -m "Add feature to generate multiple content types"
Once committed, push the changes to your forked repository:
git push origin feature/your-feature-name
- Visit your forked repository on GitHub.
- Click the Compare & Pull Request button.
- Provide a detailed description of what your pull request does and link to any related issues.
If the original repository has been updated since you forked it, you need to sync your fork:
- Fetch the changes from the upstream repository:
git fetch upstream
- Merge the changes into your
main
branch:git checkout main git merge upstream/main
After merging, push the updated main
branch back to your fork:
git push origin main
To get started with the project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/iamkanhaiyakumar/ai-content-generator.git cd ai-content-generator
-
Install dependencies (if applicable):
pip install -r requirements.txt # For Python dependencies npm install # For Node.js dependencies (if applicable)
-
Run tests to ensure everything is set up properly:
pytest # If using Python's pytest for testing npm test # If using JavaScript/Node.js
-
Run the application to verify your environment setup:
python app.py # For Python-based projects npm start # For JavaScript-based projects
Feel free to submit an issue or a pull request if you need help! Thanks for contributing to AI Content Generator.