Commit After Publish
A VS Code extension that automatically triggers GitHub Copilot to generate a commit message after successfully publishing your extension to the VS Code Marketplace.
Features
- Automatically generates commit messages using GitHub Copilot after successful extension publishing
- Configurable task detection for different publishing workflows
- Works with both custom tasks and npm scripts
How It Works
The extension monitors VS Code tasks and when a configured publishing task completes successfully:
- Waits for a short cooldown period (1 second)
- Opens and focuses the Source Control view
- Triggers GitHub Copilot to generate a commit message
- Shows a success notification when complete
Requirements
- Visual Studio Code
- GitHub Copilot extension
- Git repository
Configuration
This extension contributes the following settings:
{
"commit-after-publish.enabled": {
"type": "boolean",
"default": true,
"description": "Enable/disable automatic commit message generation after publishing"
},
"commit-after-publish.taskNames": {
"type": "array",
"default": ["publish", "vsce publish"],
"description": "List of task names that trigger commit message generation"
}
}
Usage
- Configure your publishing tasks in
tasks.json
- Add the task names to the
commit-after-publish.taskNames
setting
- Run your publish task
- The extension will automatically trigger GitHub Copilot to generate a commit message after successful publishing
Example tasks.json Configuration
{
"version": "2.0.0",
"tasks": [
{
"label": "Publish Extension",
"type": "shell",
"command": "vsce publish"
}
]
}
Troubleshooting
If commit messages aren't being generated:
- Verify the extension is enabled in settings
- Check that your task name is included in
commit-after-publish.taskNames
- Ensure GitHub Copilot is installed and properly configured
- Check the VS Code output panel for any error messages