Simpler.Grants.gov Public Wiki
Grants.govSimpler.Grants.govGitHubDiscourse
  • 👋Welcome
  • GET INVOLVED
    • Why open source?
    • How to contribute code
    • How to file issues
      • Report a bug
      • Request a feature
      • Report a security vulnerability
    • Community guidelines
      • Code of Conduct
      • Reporting and removing content
      • Incident response protocol
    • Community events
      • Fall 2024 Coding Challenge
        • Event Submissions & Winners
      • Spring 2025 Collaborative Coding Challenge
        • Event Submissions & Winners
    • Communication channels
  • Product
    • Roadmap
    • Deliverables
      • 🏁Static site soft launch
      • 🏁Static site public launch
      • 🏁GET Opportunities
      • 🏁Open source onboarding
      • 🏁Co-Design Group planning
    • Decisions
      • ADR Template
      • ADRs
        • Dedicated Forum for Simpler.Grants.gov Community
        • Recording Architecture Decisions
        • Task Runner for the CI / CD Pipeline
        • API Language
        • Use Figma for design prototyping
        • ADR: Chat
        • DB Choices
        • API Framework and Libraries
        • Back-end Code Quality Tools
        • Front-end Language
        • Communications Tooling: Wiki Platform
        • Use Mural for design diagrams and whiteboarding
        • Ticket Tracking
        • Front-end Framework
        • Front-end Code Quality Tools
        • Front-end Testing & Coverage
        • Backend API Type
        • Front-end Testing & Coverage
        • Deployment Strategy
        • Use U.S. Web Design System for components and utility classes
        • FE server rendering
        • Use NPM over Yarn Architectural Decision Records
        • U.S. Web Design System in React
        • Communications Tooling: Video Conferencing
        • Back-end Production Server
        • Communications Tooling: Analytics Platform
        • Commit and Branch Conventions and Release Workflow
        • Cloud Platform to Host the Project
        • Infrastructure as Code Tool
        • Data Replication Strategy & Tool
        • HHS Communications Site
        • Communications Tooling: Email Marketing
        • Communications Tooling: Listserv
        • Use Ethnio for design research
        • Uptime Monitoring
        • Database Migrations
        • 30k ft deliverable reporting strategy
        • Public measurement dashboard architecture
        • Method and technology for "Contact Us" CTA
        • E2E / Integration Testing Framework
        • Logging and Monitoring Platform
        • Dashboard Data Storage
        • Dashboard Data Tool
        • Search Engine
        • Document Storage
        • Document Sharing
        • Internal Wiki ADR
        • Shared Team Calendar Platform
        • Cross-Program Team Health Survey Tool
        • Adding Slack Users to SimplerGrants Slack Workspace
        • Repo organization
        • Internal knowledge management
        • Migrate Existing API Consumers
      • Infra
        • Use markdown architectural decision records
        • CI/CD interface
        • Use custom implementation of GitHub OIDC
        • Manage ECR in prod account module
        • Separate terraform backend configs into separate config files
        • Database module design
        • Provision database users with serverless function
        • Database migration architecture
        • Consolidate infra config from tfvars files into config module
        • Environment use cases
        • Production networking long term state
    • Analytics
      • Open source community metrics
      • API metrics
  • DESIGN & RESEARCH
    • Brand guidelines
      • Logo
      • Colors
      • Grid and composition
      • Typography
      • Iconography
      • Photos and illustrations
    • Content guidelines
      • Voice and tone
    • User research
      • Grants.gov archetypes
  • REFERENCES
    • Glossary
  • How to edit the wiki
Powered by GitBook
On this page
  • Context and Problem Statement
  • Decision Drivers
  • Options Considered
  • Branch merge strategy
  • Git commit conventions
  • Branch naming conventions
  • Branching model
  • Release workflow and Code Reviews
  • Release Workflow
  • Decision Outcome

Was this helpful?

Edit on GitHub
  1. Product
  2. Decisions
  3. ADRs

Commit and Branch Conventions and Release Workflow

PreviousCommunications Tooling: Analytics PlatformNextCloud Platform to Host the Project

Last updated 28 days ago

Was this helpful?

  • Status: Accepted.

  • Last Modified: 2023-08-21

  • Related Issue:

  • Deciders: Daphne, Sammy, Billy, Lucas

  • Tags: process, workflow, change management

Context and Problem Statement

This project needs standards for describing changes and introducing them into lower and production environments.

The items that encompass this are:

  • Git commit conventions

  • Branch naming conventions

  • Branch merge strategy

  • Branching model

  • Release workflow and naming convention

Decision Drivers

The standards should be:

  • documented

  • easy-to-use and understand

  • support agile processes

  • efficient and not create uneccessary work or friction

  • faciliate deployments to lower and production environments

  • facilitate continous integration and delivery

  • make it easy to revert features

  • facilitate both internal and external contributions

Options Considered

Branch merge strategy

  • Pros

    • A single commit for a PR makes it easier to see all changes introduced for an entire feature

    • Squashing commits lowers the cognitive load for developers writing commits to a branch

    • Github has a "squash and merge" feature which makes it easy to implement this strategy

  • Cons

    • Squashing, even in a small feature branch, means that each commit in the history does not have a minimal scope

    • Reverting changes is harder because individual changes that comprise a feature cannot easily be pulled out in the history

The pros and cons for this strategy are described in reverse above. There is a higher congitive load for developers as each commit needs to be properly formatted, descriptive, and ideally atomic. However the history is more traversable if individual and tightly scoped commits are maintained.

Git commit conventions

This encompasses the commit messages pushed to branches. This is tied to the decision to the branch merge strategy and assumes the use of the "squash and merge" strategy and github feature. The following options were considered:

No commit convention

  • Pros

    • Developers don't need to worry about the format of a commit while working on features

    • Lower overhead for each commit for some contributors, promoting more frequent commits during development

    • Less to read through when composing the "squash and merge" commit message if commits are shorter

    • No tools or learning curve necessary

    • Encourages necessary context be given in code comments or documentation instead of commit history

  • Cons

    • Individual messages in pull requests are harder to read as every developer might use a different format

    • It is easier to accidentally include poorly worded or formatted messages using the "squash and merge" tool

    • Developers need to consider how to word messages with each commit, instead of relying on a convention that describes how changes should be formatted

Conventional Commits

  • Pros

    • Widely adopted

    • Extreme precision in messages, reduced ambiguity

    • Automatically generated CHANGELOGs

    • Makes it easier for people to contribute to your projects, by allowing them to explore a more structured commit history

    • CLI tools to facilitate adoption

  • Cons

    • Learning curve for adoption

    • Less usfeul in a "squash and merge" strategy

    • Not used by supporting organization

    • While widely adopted, not universally embraced

"7 Rules" Convention

  • Pros

    • Widely adopted

    • Used by Github UI when editing or adding a file

    • CLI tools to facilitate adoption

    • Less prescriptive than conventional commits

  • Cons

    • Learning curve for adoption

    • Less usfeul in a "squash and merge" strategy

    • Not used by supporting organization

    • While widely adopted, not universally embraced

Branch naming conventions

This project will use [github-username]/issue-[issue-number]-[feature-name] convention for branch naming conventions.

Branching model

Trunk Based Development

  • Pros

    • Widely adopted in general and preferred by the supporting engineering organization

    • Facilitates continuos integration

    • Facilitates continuous delivery

    • Facilitates lean experiments

    • Simpler and more efficient than some other models

  • Cons

    • Doesn't facilitate releasing multiple versions of software, which is necessary in some cases (but not envisioned on this project)

Gitflow

Release workflow and Code Reviews

The following conventions will be adopted:

  • Pull Requests (PRs) will be merged directly into main.

  • PRs will be titled [Issue N] Short description

    • PRs with no issue should use [Fix] Short description

Release Workflow

  • Changes main will be immediately deployed to a lower environment

  • Releases will be made frequently and include a changelog of updates

Decision Outcome

This project will use:

  • a trunk based development strategy with calendar versioned releases

  • git commit conventions will not be enforced individual PR commits

  • "squash and merge" stratey for merging PRs with a defined naming convention

  • contribution and development practices will be documented in CONTRIBUTING.md, READM.md, and other documents in the repository

are seen by many as important method for creating a clear and revertable history

is a specification for adding human and machine readable meaning to commit messages.

describes 7 widely adopted rules that are less presciptive than conventional commits, but still describe best practices.

is source-control branching model, where developers collaborate on code in a single branch called main.

uses feature branches and multiple primary branches. it has fallen in popularity in favor of trunk based development, and was not seriously considered for this project.

PRs will follow, with small changes, the guidelines and be documented in CONTRIBUTING.md

Code reviews will follow, with small changes, the

Releases will use versioning naming conventions

#185
squash and merge
atomic commits
rebase and merging commits
Conventional commits
The seven rules of a great Git commit message
Trunk Based Development
Gitflow
Some argue
Code Change Lifecycle / Contributing
Code Review Guidelines
CalVer