UNPKG

changesets-gitlab

Version:

[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/un-ts/changesets-gitlab/ci.yml?branch=main)](https://github.com/un-ts/changesets-gitlab/actions/workflows/ci.yml?query=branch%3Amain) [![CodeRabbit Pull Request Revie

23 lines 857 B
import { setFailed } from '@actions/core'; import dotenv from 'dotenv'; dotenv.config(); let isGitlabTokenValidated = false; 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', get GITLAB_TOKEN() { if (!isGitlabTokenValidated) { isGitlabTokenValidated = true; if (!process.env.GITLAB_TOKEN) { setFailed('Please add the `GITLAB_TOKEN` to the changesets action'); } } return process.env.GITLAB_TOKEN; }, }; //# sourceMappingURL=env.js.map