Skip to content

Instantly share code, notes, and snippets.

@Maxiviper117
Created January 6, 2025 08:35
Show Gist options
  • Save Maxiviper117/9c1bfeae98798c27e7c8f5ad457b5acb to your computer and use it in GitHub Desktop.
Save Maxiviper117/9c1bfeae98798c27e7c8f5ad457b5acb to your computer and use it in GitHub Desktop.
Vscode Github Copilot Commit message instructions
{
"github.copilot.chat.commitMessageGeneration.instructions": [
{
"text": "Generate commit messages following the Conventional Commits specification. Use the following structure strictly:\n\n<type>[optional scope]: <short description>\n\nOptional body: Include a detailed explanation of the change if necessary. Wrap text at 72 characters per line.\n\nOptional footer: Include metadata such as issue references or breaking changes. Use keywords like 'BREAKING CHANGE:' followed by an explanation, and reference issues with 'Closes #<issue_number>'.\n\nTypes must be one of the following:\n- feat: For introducing new features.\n- fix: For bug fixes.\n- docs: For documentation-only changes.\n- style: For changes that do not affect code functionality (e.g., formatting).\n- refactor: For code changes that neither fix a bug nor add a feature.\n- test: For adding or modifying tests.\n- chore: For non-code tasks such as updating dependencies.\n\nThe short description must be imperative (e.g., 'add feature', 'fix bug'), and avoid punctuation at the end. Scope is optional but encouraged to specify the affected area of the codebase (e.g., 'api', 'auth', 'ui'). Ensure clarity and consistency in the message."
}
]
}
@Maxiviper117
Copy link
Author

Generate commit messages following the Conventional Commits specification. Use the following structure strictly:

<type>[optional scope]: <short description>

Optional Body:

  • Include a detailed explanation of the change if necessary.
  • Wrap text at 72 characters per line.

Optional Footer:

  • Include metadata such as issue references or breaking changes.
  • Use keywords like BREAKING CHANGE: followed by an explanation.
  • Reference issues with Closes #<issue_number>.

Types must be one of the following:

  • feat: For introducing new features.
  • fix: For bug fixes.
  • docs: For documentation-only changes.
  • style: For changes that do not affect code functionality (e.g., formatting).
  • refactor: For code changes that neither fix a bug nor add a feature.
  • test: For adding or modifying tests.
  • chore: For non-code tasks such as updating dependencies.

The short description must:

  • Be imperative (e.g., "add feature", "fix bug").
  • Avoid punctuation at the end.

Scope:

  • Scope is optional but encouraged.
  • Use it to specify the affected area of the codebase (e.g., api, auth, ui).

Overall Goal:

  • Ensure clarity and consistency in the commit messages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment