@bonvoy/plugin-gitlab
v0.12.0
Published
🚢 GitLab releases plugin for bonvoy
Downloads
296
Readme
@bonvoy/plugin-gitlab 🚢
GitLab releases and MR plugin for bonvoy
Creates GitLab releases with changelogs and manages release merge requests.
Installation
npm install @bonvoy/plugin-gitlabFeatures
- ✅ Creates GitLab releases for each published package
- ✅ Creates release MRs for PR-based workflow
- ✅ Auto-detects project from package.json or git remote
- ✅ Includes changelog as release description
- ✅ Custom GitLab host support (self-hosted)
- ✅ Dry-run support
Configuration
// bonvoy.config.js
export default {
gitlab: {
token: process.env.GITLAB_TOKEN, // default
host: 'https://gitlab.com', // default, or self-hosted URL
projectId: 'my-group/my-project', // optional, auto-detected
},
};Hooks
This plugin taps into the following hooks:
| Hook | Action |
|------|--------|
| makeRelease | Creates GitLab releases for published packages |
| createPR | Creates a release MR with version bumps and changelog |
Requirements
GITLAB_TOKENenvironment variable withapiscope- For self-hosted:
GITLAB_HOSTenvironment variable (optional)
Project Detection
The plugin auto-detects the project in this order:
- Config option (
projectId) package.jsonrepository field- Git remote URL
Supported URL formats:
https://gitlab.com/group/projecthttps://gitlab.com/group/subgroup/project[email protected]:group/project.git
Environment Variables
| Variable | Description |
|----------|-------------|
| GITLAB_TOKEN | GitLab personal access token |
| GITLAB_HOST | GitLab host URL (default: https://gitlab.com) |
MR Workflow
When using bonvoy prepare, this plugin:
- Creates an MR from the release branch to the base branch
- Sets MR title and description with version bumps and changelog
- Stores MR info in
.bonvoy/release-pr.jsonfor merge detection
Usage
To use GitLab instead of GitHub, disable the GitHub plugin:
// bonvoy.config.js
export default {
plugins: [
'@bonvoy/plugin-gitlab',
// GitHub plugin is disabled when GitLab is explicitly added
],
};License
MIT
