https://github.com/tomerh2001/semantic-release-gitlab-merge-request
Semantic-release plugin to automate the creation of merge requests for GitLab repositories when releasing new versions.
https://github.com/tomerh2001/semantic-release-gitlab-merge-request
gitlab plugin semantic-release
Last synced: 11 months ago
JSON representation
Semantic-release plugin to automate the creation of merge requests for GitLab repositories when releasing new versions.
- Host: GitHub
- URL: https://github.com/tomerh2001/semantic-release-gitlab-merge-request
- Owner: tomerh2001
- Created: 2023-09-29T13:16:27.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-12-31T23:51:21.000Z (over 1 year ago)
- Last Synced: 2025-03-17T23:42:28.677Z (over 1 year ago)
- Topics: gitlab, plugin, semantic-release
- Language: JavaScript
- Homepage:
- Size: 176 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# semantic-release-gitlab-merge-request
[](https://github.com/semantic-release/semantic-release)
[](https://github.com/xojs/xo)
[**semantic-release**](https://github.com/semantic-release/semantic-release) plugin to automate the creation of merge requests for GitLab repositories when releasing new versions.
## Features
- Prepare the release by pushing the release branch to GitLab.
- Automatically create a merge request for the new release.
## Install
```bash
$ npm install semantic-release-gitlab-merge-request -D
$ yarn add semantic-release-gitlab-merge-request --dev
$ bun i semantic-release-gitlab-merge-request --dev
```
## Usage
To use this plugin, add it to your `semantic-release` configuration. For instance:
```json
{
"plugins": [
"semantic-release-gitlab-merge-request"
]
}
```
## Configuration
### Environment Variables
| Variable | Description |
| --------------------------- | --------------------------------------------------------------------- |
| `GITLAB_TOKEN` | **Required.** The token used to authenticate with GitLab. |
| `GITLAB_URL` | The GitLab instance URL (e.g., 'https://gitlab.com'). |
| `GITLAB_PROJECT_ID` | **Required.** The ID of the GitLab project. |
| `GITLAB_SOURCE_BRANCH` | The source branch for the merge request (defaults to `release/vx.y.z`)|
### Options
| Option | Description | Default |
| --------------- | ------------------------------------------------------------ | --------------------------------------- |
| `gitlabToken` | The token used to authenticate with GitLab. | - |
| `gitlabUrl` | The GitLab instance URL. | 'https://gitlab.com' |
| `projectId` | The ID of the GitLab project. | - |
| `sourceBranch` | The source branch for the merge request. | `release/vx.y.z` |
| `targetBranch` | **Required.** The target branch for the merge request. | - |
Remember to replace `x.y.z` with the appropriate version numbers.
## Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please [create an issue](#).
## License
[MIT License](#)