Skip to content

Suggested Scopes Feature

DupelaWebsite edited this page Sep 6, 2024 · 5 revisions

Feature

feature/{scope}/{description}

Feature Branch Naming Convention

  1. Prefix: Use feature/ as a prefix for all feature branches. This helps distinguish them from other types of branches like bugfix/, hotfix/, or release/.

  2. Scope/Context: Optionally include a scope or context, such as the name of the developer (dev) or the module being worked on. This provides additional clarity, especially in larger teams.

  3. Action/Description: Use a concise, lowercase description of the feature or change. This should be hyphenated to separate words and clearly describe the feature being developed.

  4. Ticket/Issue ID: (Optional) If you're working in a task management system like Jira or GitHub Issues, you can include the ticket number or issue ID. This helps track work more easily.

Feature Development:

  • feature/dev-add-todo-feature
  • feature/ui-update-button-style

Feature Scopes for Specific Modules:

  • feature/authentication-add-oauth
  • feature/payment-gateway-integration

Multiple Developers on Different Features:

  • feature/john-add-search-functionality
  • feature/jane-refactor-signup-flow

Branch Tied to Issue/Task:

  • feature/1234-add-search-bar

Suggested Scopes for Feature Branches

auth:

For authentication-related features. Example: feature/auth/add-oauth-support

api:

For features involving API development or integrations. Example: feature/api/add-payment-gateway

frontend:

For frontend user interface-related work. Example: feature/frontend/add-new-dashboard

backend:

For backend services, logic, or server-side features. Example: feature/backend/add-logging-service

db:

For database-related changes. Example: feature/db/add-new-tables

ui:

For changes related to the user interface. Example: feature/ui/update-button-styles

ux:

For work focused on user experience improvements. Example: feature/ux/improve-onboarding-flow

docs:

For documentation updates or new documentation. Example: feature/docs/add-api-endpoint-docs

test:

For creating or updating tests. Example: feature/test/add-unit-tests

refactor:

For refactoring code without adding new features. Example: feature/refactor/improve-auth-service

config:

For configuration updates or changes. Example: feature/config/update-ci-settings

build:

For changes related to the build process. Example: feature/build/optimize-webpack-config

deploy:

For deployment-related work, such as changes to deployment scripts. Example: feature/deploy/improve-rollback-strategy

security:

For security enhancements or fixes. Example: feature/security/add-2fa

performance:

For performance improvements. Example: feature/performance/optimize-query-performance

logging:

For logging and monitoring features. Example: feature/logging/add-application-logging

i18n:

For internationalization or localization efforts. Example: feature/i18n/add-spanish-translations

analytics:

For features involving tracking or analytics. Example: feature/analytics/add-user-tracking

notifications:

For features related to notifications or alerts. Example: feature/notifications/add-email-alerts

migration:

For database or infrastructure migrations. Example: feature/migration/perform-db-schema-update

style:

For updating or standardizing code style or formatting. Example: feature/style/apply-new-eslint-rules

ci:

For Continuous Integration updates or improvements. Example: feature/ci/improve-circleci-setup

feature:

General scope for features that don’t fall under a specific module. Example: feature/feature/add-todo-functionality

media:

For handling media-related features like image or video handling. Example: feature/media/add-image-upload

plugin:

For plugin or extension development. Example: feature/plugin/create-payment-plugin

Scope Suggestions Based on Application Modules

You can also define scopes based on specific modules or areas of your application, especially if your codebase is modular or follows a microservices architecture. Some examples might include:

user:

For user management features. Example: feature/user/add-profile-picture

admin:

For features related to admin functionality. Example: feature/admin/add-dashboard

payment:

For payment processing features. Example: feature/payment/add-stripe-integration

notifications:

For notifications or messaging. Example: feature/notifications/improve-push-notifications

dashboard:

For dashboard or UI components. Example: feature/dashboard/add-charts

cart:

For e-commerce cart functionality. Example: feature/cart/add-discount-codes

order:

For order management features. Example: feature/order/enable-order-tracking

profile:

For user profile features. Example: feature/profile/add-user-settings