Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitLab notification settings cannot be loaded on self-hosted GitLab instances #97

Open
irvinlim opened this issue Feb 23, 2020 · 0 comments

Comments

@irvinlim
Copy link

I'm running a self-hosted GitLab instance and a self-hosted Integram bot.

When I use the /settings command on a GitLab bot and make some changes (e.g. CI.Success = true), this setting is not loaded correctly when the webhook handler is fired.

I narrowed down the cause to a bug in getServiceID() for this particular case:

  • In webhookHandler
    • getServiceID() returns gitlab_mydomain_com
  • In settingsKeyboardPressed
    • getServiceID() returns gitlab

Because of this, c.Chat.Settings(&s) returns different values depending on whether a webhook is received or the keyboard button is pressed for tuning the settings.

The underlying cause is because SetServiceBaseURL() is not called in settingsKeyboardPressed because there is no webhook base URL to set.

I'm not too familiar with the rationale behind a dynamic ServiceBaseURL that changes with each request. Does it make sense to pass an environment variable allows me to define the default base URL for the particular bot instance? Or when tuning the settings, I should be able to pass in a base URL?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant