Skip to content

Missing root path in GitLab webhook #2534

@rodarima

Description

@rodarima

Component

server

Describe the bug

When enabling a new GitLab repository, the webhook is set in GitLab with the API address https://example.com/api/hook. However, the server has the WOODPECKER_ROOT_PATH=/ci, and it should be https://example.com/ci/api/hook in my case.

Changing it manually in the GitLab configuration fails because the GitLab webhook token gets erased and I don't know where to get it from, so I cannot use the webhook.

I suspect the problem is here: https://github.com/woodpecker-ci/woodpecker/blob/931af16d14e94fbf6fbb94a167251fc2d6bedded/server/forge/gitlab/gitlab.go#L450C57-L450C57

System Info

I'm using woodpecker-server 1.0.2 in NixOS:

{"source":"https://github.com/woodpecker-ci/woodpecker","version":"1.0.2"}

Additional context

No response

Validations

  • Read the Contributing Guidelines.
  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Checked that the bug isn't fixed in the next version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]
  • Check that this is a concrete bug. For Q&A join our Discord Chat Server or the Matrix room.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingforge/gitlabgitlab forge related

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions