Contributing Guidelines
This guide explains how to contribute to the DISC Workshop Series Website. Due to our deployment setup, we follow a specific fork-based workflow.
Repository Setup
There are two main repositories involved in our workflow:
-
DISC-NU Organization Fork
- URL: https://github.com/DISC-NU/disc-fall-2024-workshop-series-website
- This is where all contributors should make their initial contributions
-
Main Repository
- URL: https://github.com/ethanpaneraa/disc-fall-2024-workshop-series-website
- This is the production repository where approved changes are ultimately merged
- Hosted on Vercel under the hobbyist tier plan
Note: We use this two-repository setup to maintain deployment on Vercel's hobbyist tier plan, which isn't available for organization-owned repositories.
Contributing Workflow
1. Initial Setup
# Clone the DISC-NU organization fork
git clone https://github.com/DISC-NU/disc-fall-2024-workshop-series-website.git
cd disc-fall-2024-workshop-series-website
# Add the main repository as a remote
git remote add upstream https://github.com/ethanpaneraa/disc-fall-2024-workshop-series-website.git
2. Making Changes
- Ensure your local main branch is up to date:
git checkout main
git pull origin main
git pull upstream main
- Create a new branch for your changes:
git checkout -b feature/your-feature-name
- Make your changes and commit them:
git add .
git commit -m "Descriptive commit message"
3. Submitting Changes
Step 1: Pull Request to DISC-NU Fork
- Push your changes to the DISC-NU fork:
git push origin feature/your-feature-name
- Go to the DISC-NU repository
- Create a Pull Request from your branch to the main branch
- Wait for review and approval
Step 2: Pull Request to Main Repository
After your changes are approved and merged into the DISC-NU fork:
- A maintainer will create a Pull Request from the DISC-NU fork to the main repository
- Changes will be reviewed again
- Upon approval, changes will be merged and automatically deployed via Vercel
Best Practices
Commit Messages
- Use clear, descriptive commit messages
- Start with a verb (e.g., "Add", "Fix", "Update")
- Keep the first line under 50 characters
- Add more detailed explanation in the body if needed
Example:
git commit -m "Add workshop 3 content" -m "Added content for Git and VSCode workshop including:
- Installation guides
- Basic commands
- Best practices"
Branch Naming
Follow this format:
- Features:
feature/description - Fixes:
fix/description - Content:
content/description
Examples:
feature/add-searchfix/navigation-bugcontent/workshop-3
Pull Request Guidelines
- Title: Clear and descriptive
- Description: Include:
- What changes were made
- Why changes were made
- Any related issues or PRs
- Size: Keep PRs focused and reasonably sized
- Testing: Ensure all changes work locally
Code Style
- Follow existing code patterns
- Use TypeScript features appropriately
- Follow Tailwind CSS conventions
- Comment complex logic
- Use meaningful variable names
Common Tasks
Adding Workshop Content
- Create new branch:
content/workshop-X - Add content in
/contents/content/workshops/workshop-X - Update route configuration if needed
- Follow PR process as described above
Fixing Bugs
- Create branch:
fix/bug-description - Make minimal necessary changes
- Add tests if possible
- Follow PR process
Getting Help
If you need assistance:
- Check existing documentation
- Ask in DISC Discord channel
- Contact the maintainers
- Create an issue in the DISC-NU repository
Why This Setup?
We use this two-repository setup because:
- It allows us to use Vercel's hobbyist tier plan for deployment
- Provides a clear review process
- Maintains code quality through double review
- Keeps deployment costs minimal
Remember, while this workflow might seem complex, it's designed to ensure quality while keeping our deployment costs at zero.