Skip to content

Contribution Guide

Martin Ibled edited this page Oct 23, 2024 · 6 revisions

Contribution Guide

🌿 Branch Naming

  1. Branch naming: Follow this format:

    (feature|evol|fix|refactor)/(issue-number-or-brief-description)/short-descriptive-title
    

    Examples:

    feature/new-accessibility-checklist-for-angular
    feature/create-guideline-for-secure-api-design
    evol/update-react-performance-tips
    fix/incorrect-link-in-angular-routing-guide
    refactor/reorganize-css-guidelines-for-clarity
  2. Single responsibility: Each branch should focus on one type of change (feature, enhancement, fix, or refactor) and relate to a specific guideline/checklist.

💬 Commits

  1. Commit messages: Follow this format:

    [FEATURE]: concise description of the added feature
    [EVOL]: concise description of the enhancement made
    [FIX]: concise description of the bug fix
    [REFACTORING]: concise description of the refactor performed
    

    Examples:

    [FEATURE]: Add new React Hooks best practices
    [EVOL]: Update Angular security checklist with latest recommendations
    [FIX]: Correct broken link in WCAG guidelines
    [REFACTOR]: Reorganize a11y checklist for better readability
  2. Atomic commits: Each commit should represent a single, logical change.

  3. Commit organization: Order commits logically within a PR. For example:

    [FEATURE]: Add basic structure for React Hooks best practices section
    [FEATURE]: Add guideline for useState Hook
    [EVOL]: Enhance useState guideline with common patterns
    [FIX]: Correct typo in useEffect example
    [REFACTOR]: Reorganize Hook guidelines for better flow

🔄 Pull Requests

  1. Title and Description: The title of a Pull Request follows this rule:

    [FEATURE]: for a new feature
    [EVOL]: for an enhancement
    [FIX]: for a bug fix
    [REFACTORING]: for a refactor
    

    Include essential keywords for easy searching.

    Example:

    Branch: feature/add-eslint-config-for-react
    
    Commits:
    [FEATURE]: Add basic structure for React Hooks best practices section
    [FEATURE]: Add guideline for useState Hook
    [EVOL]: Enhance useState guideline with common patterns
    [FIX]: Correct typo in useEffect example
    [REFACTOR]: Reorganize Hook guidelines for better flow
    
    Pull Request:
    Title: [FEATURE]: Add new React Hooks best practices
    
    Description:
    This PR introduces a new section to the "gems" repository on best practices for using React Hooks. This addition is motivated by the increasing popularity of Hooks as the preferred way to manage state and side effects in React components.
  2. Code review: Assign at least one reviewer with expertise in the relevant area. Ensure approval before merging.

  3. Labels: Use labels to indicate the type of change (e.g., "React," "Angular," "Security," "Accessibility") and the status of a PR (e.g., "needs review," "approved," "work in progress").

Clone this wiki locally