{"id":51403940,"url":"https://github.com/dvashim/changesets-gitlab","last_synced_at":"2026-07-04T09:32:34.068Z","repository":{"id":346022382,"uuid":"1188185597","full_name":"dvashim/changesets-gitlab","owner":"dvashim","description":"GitLab CI CLI for changesets — automate versioning, changelogs, and publishing via merge requests","archived":false,"fork":false,"pushed_at":"2026-04-10T21:06:21.000Z","size":1341,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-01T06:18:21.064Z","etag":null,"topics":["changelog","changesets","ci-cd","gitlab","gitlab-ci","merge-request","npm-publish","release-automation","typescript","versioning"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dvashim.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-21T18:22:57.000Z","updated_at":"2026-03-29T19:27:15.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/dvashim/changesets-gitlab","commit_stats":null,"previous_names":["dvashim/changesets-gitlab"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/dvashim/changesets-gitlab","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvashim%2Fchangesets-gitlab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvashim%2Fchangesets-gitlab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvashim%2Fchangesets-gitlab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvashim%2Fchangesets-gitlab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dvashim","download_url":"https://codeload.github.com/dvashim/changesets-gitlab/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dvashim%2Fchangesets-gitlab/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35117335,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-04T02:00:05.987Z","response_time":113,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["changelog","changesets","ci-cd","gitlab","gitlab-ci","merge-request","npm-publish","release-automation","typescript","versioning"],"created_at":"2026-07-04T09:32:33.377Z","updated_at":"2026-07-04T09:32:34.053Z","avatar_url":"https://github.com/dvashim.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @dvashim/changesets-gitlab\n\n[![npm version](https://img.shields.io/npm/v/@dvashim/changesets-gitlab.svg?logo=npm\u0026style=flat-square\u0026color=07c\u0026label=@dvashim/changesets-gitlab)](https://www.npmjs.com/package/@dvashim/changesets-gitlab) [![npm downloads](https://img.shields.io/npm/dm/@dvashim/changesets-gitlab?logo=npm\u0026style=flat-square\u0026color=07c)](https://www.npmjs.com/package/@dvashim/changesets-gitlab) [![Checked with Biome](https://img.shields.io/badge/Checked_with-Biome-60a5fa?style=flat-square\u0026logo=biome\u0026color=07c\u0026logoColor=fff)](https://biomejs.dev)\n\n\u003e Based on project [`un-ts/changesets-gitlab`](https://github.com/un-ts/changesets-gitlab) by [JounQin](https://github.com/JounQin)\n\nGitLab CI CLI for [changesets](https://github.com/atlassian/changesets), similar to the [GitHub Action](https://github.com/changesets/action). It creates a merge request with all of the package versions updated and changelogs updated, and when there are new changesets on the default branch, the MR will be updated. When you're ready, you can merge the merge request and either publish the packages to npm manually or set up the CLI to do it for you.\n\n## Usage\n\n### Inputs\n\n\u003e Note: environment variables are case-sensitive\n\n- `INPUT_PUBLISH` - The command to use to build and publish packages\n- `INPUT_VERSION` - The command to update version, edit CHANGELOG, read and delete changesets. Defaults to `changeset version` if not provided\n- `INPUT_COMMIT` - The commit message to use. Default `Version Packages`\n- `INPUT_TITLE` - The merge request title. Default `Version Packages`\n\n#### Only available in `@dvashim/changesets-gitlab`\n\n- `INPUT_PUBLISHED` - Command executed after publishing\n- `INPUT_ONLY_CHANGESETS` - Command executed when only changesets are detected\n- `INPUT_REMOVE_SOURCE_BRANCH` - Enables the merge request \"Delete source branch\" checkbox. Default `false`\n- `INPUT_TARGET_BRANCH` - The merge request target branch. Defaults to the current branch\n- `INPUT_CREATE_GITLAB_RELEASES` - Whether to create GitLab releases after publish. Default `true`\n- `INPUT_LABELS` - A comma-separated string of labels to add to the version package merge request\n\n### Outputs\n\n- `PUBLISHED` - A boolean value indicating whether publishing happened\n- `PUBLISHED_PACKAGES` - A JSON array of published packages. Format: `[{\"name\": \"@xx/xx\", \"version\": \"1.2.0\"}, {\"name\": \"@xx/xy\", \"version\": \"0.8.9\"}]`\n\n### Environment Variables\n\n```sh\nGLOBAL_AGENT_HTTP_PROXY  # optional, if you're using a custom GitLab service under proxy\nGLOBAL_AGENT_HTTPS_PROXY # as above but for https requests\nGLOBAL_AGENT_NO_PROXY    # as above but for non-proxied requests\n\n# http_proxy, https_proxy, no_proxy environment variables are also supported\n\nGITLAB_HOST # optional, custom GitLab host, falls back to `CI_SERVER_URL` if not provided\n\nGITLAB_TOKEN                           # required, token with access to push, package registries, and merge request APIs. Note: CI_JOB_TOKEN does not have sufficient permissions\nGITLAB_TOKEN_TYPE                      # optional, type of the provided token. Defaults to personal access token. Set to `oauth` for GitLab OAuth tokens\nGITLAB_CI_USER_NAME                    # optional, username for pushing, paired with the token (if personal access token). If not set, read from the GitLab API\nGITLAB_CI_USER_EMAIL                   # optional, default `gitlab[bot]@users.noreply.gitlab.com`\nGITLAB_COMMENT_TYPE                    # optional, type of the comment. Defaults to `discussion`. Set to `note` for a simple comment instead of a thread\nGITLAB_COMMENT_DISCUSSION_AUTO_RESOLVE # optional, auto-resolve discussion when changeset is present. If you want to always resolve, use `GITLAB_COMMENT_TYPE=note` instead. Default `true`\nGITLAB_COMMENT_CUSTOM_LINKS            # optional, override the links in the bot comment. Use {{ addChangesetUrl }} placeholder for the dynamic URL to add a changeset\nGITLAB_ADD_CHANGESET_MESSAGE           # optional, default commit message for adding changesets on GitLab Web UI\nDEBUG_GITLAB_CREDENTIAL                # optional, whether to log the remote URL with the token visible\n```\n\n### Example workflow\n\n#### Without publishing\n\nCreate a file at `.gitlab-ci.yml` with the following content.\n\n```yml\nstages:\n  - comment\n  - release\n\ncomment:\n  image: node:lts-alpine\n  stage: comment\n  before_script: pnpm install --frozen-lockfile\n  rules:\n    - if: $CI_PIPELINE_SOURCE == \"merge_request_event\"\n  script: pnpm changesets-gitlab comment\n\nrelease:\n  image: node:lts-alpine\n  stage: release\n  before_script: pnpm install --frozen-lockfile\n  rules:\n    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH\n  script: pnpm changesets-gitlab\n```\n\n#### With publishing\n\nYou'll need an [npm token](https://docs.npmjs.com/creating-and-viewing-authentication-tokens) that can publish the packages in the repo and doesn't have 2FA on publish enabled ([2FA on auth can be enabled](https://docs.npmjs.com/about-two-factor-authentication)). [Add it as a CI/CD variable](https://docs.gitlab.com/ee/ci/variables/#custom-cicd-variables) with the name `NPM_TOKEN`.\n\n```yml\nstages:\n  - comment\n  - release\n\ncomment:\n  image: node:lts-alpine\n  stage: comment\n  before_script: pnpm install --frozen-lockfile\n  rules:\n    - if: $CI_PIPELINE_SOURCE == \"merge_request_event\"\n  script: pnpm changesets-gitlab comment\n\nrelease:\n  image: node:lts-alpine\n  stage: release\n  before_script: pnpm install --frozen-lockfile\n  rules:\n    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH\n  script: pnpm changesets-gitlab\n  variables:\n    INPUT_PUBLISH: pnpm release\n```\n\nBy default, the CLI creates a `~/.npmrc` file with the `NPM_TOKEN` interpolated as the auth token for `registry.npmjs.org`. If a `.npmrc` file already exists, it will not be overwritten. This is useful if you need to configure `.npmrc` yourself:\n\n```yml\nscript: |\n  cat \u003c\u003c EOF \u003e \"$HOME/.npmrc\"\n    email=my@email.com\n    //registry.npmjs.org/:_authToken=$NPM_TOKEN\n  EOF\n```\n\n#### With version script\n\nIf you need to add additional logic to the version command, you can use a version script.\n\nWhen the version script is present, the CLI will run that script instead of `changeset version`, so make sure your script calls `changeset version` at some point. All changes made by the script will be included in the MR.\n\n```yml\nstages:\n  - comment\n  - release\n\ncomment:\n  image: node:lts-alpine\n  stage: comment\n  before_script: pnpm install --frozen-lockfile\n  rules:\n    - if: $CI_PIPELINE_SOURCE == \"merge_request_event\"\n  script: pnpm changesets-gitlab comment\n\nrelease:\n  image: node:lts-alpine\n  stage: release\n  before_script: pnpm install --frozen-lockfile\n  rules:\n    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH\n  script: pnpm changesets-gitlab\n  variables:\n    INPUT_VERSION: pnpm version-packages\n```\n\n## Changelog\n\nDetailed changes for each release are documented in [CHANGELOG.md](./CHANGELOG.md).\n\n## License\n\n[MIT](http://opensource.org/licenses/MIT) © [Aleksei Reznichenko](https://github.com/dvashim)\n\nOriginally created by [JounQin](https://github.com/JounQin) at [un-ts/changesets-gitlab](https://github.com/un-ts/changesets-gitlab).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdvashim%2Fchangesets-gitlab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdvashim%2Fchangesets-gitlab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdvashim%2Fchangesets-gitlab/lists"}