Skip to content

gitlab webhook KO empty response #1885

Open
@chris93111

Description

@chris93111

Hello

When deploy workspace and enable webhook on gitlab-ce, gitlab response with [] empty array

In this code gitbalbwebhook the api request is search?scope=projects&search=" + ownerAndRepo based on only 2 stages ( Arrays.copyOfRange(..., 1, 3))

So path with many groups can't work

Also Search api need a project name for search not a path https://docs.gitlab.com/api/search/#scope-projects

.uri(URI.create(gitlabBaseUrl + "/search?scope=projects&search=" + ownerAndRepo))

curl "https://mygitlab/api/v4/search?scope=projects&search=provisionning/terraform/projets/projet01/dev_demo" -H 'Authorization: Bearer mytoken' > []

curl "https://mygitlab/api/v4/search?scope=projects&search=dev_demo" -H 'Authorization: Bearer mytoken' > [{"id":49818,"description":null,"name":"dev_demo", ...}]

Maybe the target match can be defined with the key http_url_to_repo to match with workspace.getVcs().getApiUrl()

Terrakube 2.25.0
Helm

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions