Add the following data to settings.json
within VSCode to auto-generate commit messages with Copilot using the Conventional Commit format. This is based off of this example, however includes more explicit instructions for all commit prefixes (such as docs, refactor, etc).
"github.copilot.chat.commitMessageGeneration.instructions": [
{
"text": "Generate commit messages in Conventional Commits format with gitmoji. Follow this exact structure:\n\n```\n<type>[optional scope]: <gitmoji> <description>\n\n[optional body]\n```\n\nExamples:\n- `feat(auth): :sparkles: add new login validation`\n- `fix(api): :bug: resolve user data fetch timeout`\n- `docs: :memo: update README installation steps`\n- `docs: :bookmark: add JSDoc comments to media component`\n- `style: :art: format code according to linting rules`\n- `refactor: :recycle: restructure video platform detection logic`\n\nTypes must be one of:\n- `feat`: A new feature\n- `fix`: A bug fix\n- `docs`: Documentation changes including README updates, JSDoc comments, and code documentation\n- `style`: Changes not affecting code functionality (formatting, whitespace, etc)\n- `refactor`: Code structure changes that neither fix bugs nor add features\n- `perf`: Code change that improves performance\n- `test`: Adding or correcting tests\n- `build`: Changes affecting build system or dependencies\n- `ci`: Changes to CI configuration such as GitHub Actions or Jenkins\n- `chore`: Other changes not modifying src or test files\n- `revert`: Reverting a previous commit\n\nAlways include a relevant gitmoji code at the start of the description. Match the gitmoji to the type of change.\n\nImportant: Use `docs` (with :bulb: or :memo:) for JSDoc additions/changes, not `refactor`.\n\nFor the body:\n- Use bullet points (`*`) for multiple items\n- Explain WHY the change was needed\n- Include relevant context or technical details\n\nEnsure the message is professional and clearly communicates the purpose of the commit."
}
],