6.4 KiB
Contribution Guidelines
First and most importantly of all: Thank you for your interest in contributing to the Awesome Java list!
Automated Workflow
This repository uses an automated workflow to maintain the main README.md file. Here's how it works:
For Contributors
- Edit
CONTRIBUTE_README.md- Make all your changes to this file, notREADME.md - Submit a Pull Request - Create a PR with your changes to
CONTRIBUTE_README.md - GitHub Actions will automatically:
- Convert the list format to HTML tables
- Add GitHub stars and last commit badges
- Update
README.mdwith the converted content - Commit and push the changes
What NOT to do
- Don't edit
README.mddirectly - It will be overwritten by the automated workflow - Don't edit the scripts unless you're improving the conversion process
- Don't manually run the conversion scripts - GitHub Actions handles this
How to Contribute
Adding a New Project
- Find the appropriate section in
CONTRIBUTE_README.md - Add your entry using this format:
- [Project Name](https://github.com/user/repo) - Brief description of what the project does. - Follow the existing style
- Submit a Pull Request
Updating an Existing Project
- Find the project in
CONTRIBUTE_README.md - Update the description or URL as needed
- Submit a Pull Request with your changes
Adding a New Category
- Add the category to the Contents section
- Create a new section with the appropriate heading
- Add projects to the new section
- Submit a Pull Request with your changes
Guidelines
Project Requirements
- Must be Java-related - The project should be primarily for Java development
- Must be actively maintained - Recent commits and releases
- Must be useful - Provide value to Java developers
Description Guidelines
- Be concise - Keep descriptions on point
- Be descriptive - Explain what the project does and why it's useful
- Be accurate - Ensure the description matches the current project state
- Use proper grammar - Write in clear, professional English
Format Guidelines
- Use consistent formatting - Follow the existing style
- Maintain alphabetical order - Within each section
- Use proper markdown - Follow the established patterns
- Include relevant links - Link to GitHub repositories when possible
Workflow Details
GitHub Actions Workflow
The automated workflow (update-readme.yml) runs when:
- Push to master - When
CONTRIBUTE_README.mdor scripts are updated - Pull Request - When
CONTRIBUTE_README.mdor scripts are modified - Manual trigger - Can be triggered manually from the Actions tab
File Structure
├── CONTRIBUTE_README.md # Source file (edit this)
├── README.md # Generated file (don't edit)
├── scripts/
│ ├── run_workflow.java # Main workflow orchestrator
│ ├── step_1_validate_input.java # Input validation
│ ├── step_2_parse_projects.java # Project parsing
│ ├── step_3_generate_badges.java # Badge generation
│ ├── step_4_generate_tables.java # HTML table generation
│ ├── step_5_assemble_readme.java # Final assembly
│ ├── step_6_validate_transformation.java # Data integrity validation
│ ├── ProjectEntry.java # Data model
│ ├── FileUtils.java # Utility functions
│ ├── Constants.java # Shared constants
│ └── README.md # Script documentation
├── .tmp/ # Temporary files (auto-generated)
│ ├── parsed-projects.txt
│ ├── github-badges.txt
│ └── generated-tables.html
└── .github/workflows/
└── update-readme.yml # GitHub Actions workflow
Workflow Process
The README generation follows a 6-step modular process:
-
Step 1 - Input Validation (
step_1_validate_input.java)- Validates that
CONTRIBUTE_README.mdexists and is readable - Provides file statistics
- Validates that
-
Step 2 - Project Parsing (
step_2_parse_projects.java)- Parses markdown content to extract project entries
- Handles multi-line descriptions
- Outputs:
parsed-projects.txt
-
Step 3 - Badge Generation (
step_3_generate_badges.java)- Generates GitHub badges for repositories
- Creates stars and last-commit badges
- Outputs:
github-badges.txt
-
Step 4 - Table Generation (
step_4_generate_tables.java)- Combines parsed projects with badges
- Generates HTML tables with proper styling
- Outputs:
generated-tables.html
-
Step 5 - Final Assembly (
step_5_assemble_readme.java)- Combines original content with generated tables
- Produces the final
README.md
-
Step 6 - Validation (
step_6_validate_transformation.java)- Validates that all entries from original are present in transformed README
- Ensures entries are in the correct sections
- Reports missing entries, wrong sections, and extra entries
Running the Workflow
Complete Workflow:
java --enable-preview --source 25 scripts/run_workflow.java
Individual Steps:
java --enable-preview --source 25 scripts/run_workflow.java [step_number]
Direct Step Execution:
java --enable-preview --source 25 scripts/step_1_validate_input.java
java --enable-preview --source 25 scripts/step_2_parse_projects.java
# ... etc
🐛 Troubleshooting
Common Issues
- Workflow fails - Check the Actions tab for error details
- Badges not showing - Ensure the repository URL is correct
- Formatting issues - Check that your markdown is valid
- Validation fails - Step 6 validates data integrity:
- Missing entries: Projects in original but not in final README
- Wrong sections: Projects in different sections than expected
- Extra entries: Projects in final README but not in original
- Section mapping issues - Ensure projects are in the correct sections
Getting Help
- Open an issue - For questions or problems
- Check existing issues - Your question might already be answered
- Review the workflow logs - In the Actions tab
📄 License
By contributing to this project, you agree that your contributions will be licensed under the same license as the project.
Remember: Always edit CONTRIBUTE_README.md, never README.md directly!