All the Software developers of Netspective Communications LLC across all the projects must have a conventional commit format for all commits made to version control repositories.
Controls
Developers are required to follow a structured conventional commit format for all commits made to the version control repositories. [FII-CQI-050-CCP-01]
- The commit format consists a header, an optional body, and an optional footer, as outlined below:
<type>(<scope>): <subject> [#ticketNumber]
[Optional body]
[Optional footer]
[FII-CQI-050-CCP-02]
-
Ensure to the commit header must be prefixed with a type, which consists of a noun (which listed in below table), followed by the OPTIONAL scope, and REQUIRED terminal colon and space. [FII-CQI-050-CCP-03]
-
It is optional to provide a longer commit body after the short description, providing additional contextual information about the code changes. [FII-CQI-050-CCP-04]
-
Ensure in the Type to describe the purpose or nature of the commit described below for any project.
Type Description is Part of conventional commits?# feat Must be used when a commit adds a new feature to your application or library. Yes fix Must be used when a commit represents a bug fix for your application. Yes chore Must be used when a commit is for a routine task. Yes build Must be used when commits include application build-related changes. Yes ci Must be used when commits include continuous integration-related changes. Yes docs Must be used when commits involve updating documents. Yes perf Must be used when commits include performance-related updates. Yes refactor Must be used when commits involve code refactoring. Yes style Must be used when commits include style-related updates. Yes test Must be used when commits include tests or test-related changes. Yes revert Must be used when reverting a previous commit. Yes feat-rfc Must be used when a commit adds RFCs, user stories, etc. for content sites or modules. No content Must be used when a commit is related to original content, curated content, newsletters, etc. No qa Must be used when commits are related to testing, such as automation rules, test scripts, etc. No seo Must be used when commits are related to SEO, such as Google Tag Manager, monitoring dashboards, etc. No pm Must be used when a commit is related to OKR, BLUF, internal communication strategy, team member details, etc. No research Must be used for commits related to work in progress (WIP) that is not yet ready for review. No design Must be used for commits related to design work. No draft Must be used for any work in progress (WIP) that is not yet ready for review. No security Must be used when addressing security vulnerabilities or implementing security measures. No #isPartofconventionalcommits indicates whether the type is recommend by https://www.conventionalcommits.org website.
[FII-CQI-050-CCP-05]
-
It is optional to provide a scope after a type. A scope must consist of a noun describing a section of the codebase surrounded by parenthesis, e.g., fix(parser) [FII-CQI-050-CCP-04]
-
In the subject provide a description that must immediately follow the colon and space after the type/scope prefix. [FII-CQI-050-CCP-05]
- The description is a short summary of the code changes, for example- “fix: resolved parsing issue when spaces were contained in the string #12”
- The maximum length of the description should be 50 characters.
- The subject must end with the ticket number. If multiple tickets are involved, use the format [#ticketNumber1, #ticketNumber2].
- Do not include a period at the end of the description.
-
It is optional to provide a [body] which Offers additional information, context, or details about the commit. [FII-CQI-050-CCP-06]
-
It is optional to provide a [footer] which includes references to related issues, tasks, or pull requests. [FII-CQI-050-CCP-07]
Evidence
Execute the below mergestat query in a CLI to identify the commits which is not keeping the controls properly.
mergestat 'SELECT MESSAGE , AUTHOR_NAME FROM commits WHERE NOT EXISTS (SELECT * FROM grep(commits.MESSAGE,\'^(feat|fix|chore|build|ci|docs|perf|refa
ctor|style|test|revert|feat-rfc|content|qa|seo|pm|research|design|draft|security)(\([a-zA-Z0-9-]+\))?: [A-Za-z0-9\s\-]+ (?:\[#\d+\]|\(#\d+\)|#\d+)\s*$(\n[A
-Za-z0-9\s\-]*)?\'))'