Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/electron-publish/src/gitlabPublisher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ export class GitlabPublisher extends HttpPublisher {
) {
super(context, true)

let token = info.token || null
if (isEmptyOrSpaces(token)) {
token = process.env.GITLAB_TOKEN || null
let token = info.token
if (isEmptyOrSpaces(token) || process.env.GITLAB_RELEASE_TOKEN) {
token = process.env.GITLAB_RELEASE_TOKEN ? process.env.GITLAB_RELEASE_TOKEN : process.env.GITLAB_TOKEN || null
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please update the GitlabOptions description about this new env var?

* Define `GITLAB_TOKEN` environment variable.
*/
export interface GitlabOptions extends PublishConfiguration {

Also, is this intended to always override the GITLAB_TOKEN env var even if the RELEASE_TOKEN is present? This logic seems odd to me but at least should be described in the docs.

After updating the publishOptions.ts tsdocs, please run pnpm generate-all for the schema and site docs.

if (isEmptyOrSpaces(token)) {
throw new InvalidConfigurationError(`GitLab Personal Access Token is not set, neither programmatically, nor using env "GITLAB_TOKEN"`)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This error message should be updated to mention the GITLAB_RELEASE_TOKEN as well.

}
Expand Down
Loading