Skip to content

Commit

Permalink
fix: gitlab vars (#1400)
Browse files Browse the repository at this point in the history
* dd

* fix gitlab vars when empty

Signed-off-by: Kasem Alem <[email protected]>

---------

Signed-off-by: Kasem Alem <[email protected]>
  • Loading branch information
kasemAlem authored Sep 24, 2024
1 parent 33d5d13 commit c1b0ab3
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 c1b0ab3

Please sign in to comment.