Skip to content

Commit

Permalink
fix gitlab vars when empty
Browse files Browse the repository at this point in the history
Signed-off-by: Kasem Alem <[email protected]>
  • Loading branch information
kasemAlem committed Sep 23, 2024
1 parent 682cc33 commit 927c45d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions magefiles/magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -914,11 +914,11 @@ func CleanGitHubWebHooks() error {
func CleanGitLabWebHooks() error {
gcToken := utils.GetEnv(constants.GITLAB_BOT_TOKEN_ENV, "")
if gcToken == "" {
return fmt.Errorf("empty PAC_GITLAB_TOKEN env")
return fmt.Errorf("empty GITLAB_BOT_TOKEN env variable")
}
projectID := utils.GetEnv(constants.GITLAB_PROJECT_ID_ENV, "")
if projectID == "" {
return fmt.Errorf("empty PAC_PROJECT_ID env. Please provide a valid GitLab Project ID")
return fmt.Errorf("empty GITLAB_PROJECT_ID env variable. Please provide a valid GitLab Project ID")
}
gitlabURL := utils.GetEnv(constants.GITLAB_API_URL_ENV, constants.DefaultGitLabAPIURL)
gc, err := gitlab.NewGitlabClient(gcToken, gitlabURL)
Expand Down

0 comments on commit 927c45d

Please sign in to comment.