diff --git a/.changeset/little-geese-rule.md b/.changeset/little-geese-rule.md new file mode 100644 index 00000000..7f587d26 --- /dev/null +++ b/.changeset/little-geese-rule.md @@ -0,0 +1,5 @@ +--- +'changesets-gitlab': patch +--- + +fix: gitlab host fallback environment variables diff --git a/src/env.ts b/src/env.ts index 2f2c4600..ac563e41 100644 --- a/src/env.ts +++ b/src/env.ts @@ -11,6 +11,10 @@ export const env = { ...process.env, CI_MERGE_REQUEST_IID: +process.env.CI_MERGE_REQUEST_IID!, + GITLAB_HOST: + process.env.GITLAB_HOST ?? + process.env.CI_SERVER_URL ?? + 'https://gitlab.com', GITLAB_CI_USER_EMAIL: process.env.GITLAB_CI_USER_EMAIL || 'gitlab[bot]@users.noreply.gitlab.com', GITLAB_COMMENT_TYPE: process.env.GITLAB_COMMENT_TYPE ?? 'discussion',