Visitar URL original
Bitbucket plugin: Support for bitbucket Datacenter/server · Issue #24188 · mattermost/mattermost · GitHub
Skip to content

Bitbucket plugin: Support for bitbucket Datacenter/server #24188

Open
mattermost-community/mattermost-plugin-bitbucket
#118

Description

@mickmister

Summary

Currently the Bitbucket plugin only supports connecting to Bitbucket Cloud due to hardcoding the Cloud URL, as noted here mattermost-community/mattermost-plugin-bitbucket#6 (comment). We also want to be able to support self-hosted Bitbucket servers.

The task here is to instead support a custom URL via plugin configuration setting.

A Bitbucket server can be spun up via docker image here https://hub.docker.com/r/atlassian/bitbucket-server. It would also be welcomed to introduce a docker-compose.yml file to the plugin repo to make it easier for others to spin up a new server, similar to https://github.com/mattermost/mattermost-plugin-jira/blob/master/docker-compose.yml

Please see plugin development documentation here for information on contributing https://developers.mattermost.com/contribute/more-info/plugins/

Ticket Link

Original issue in Bitbucket plugin repo mattermost-community/mattermost-plugin-bitbucket#6

Activity

  1. removed
    kind/featureCategorizes issue or PR as related to a new feature.
    on Aug 4, 2023
  2. panoramix360 commented on Aug 6, 2023

    @panoramix360

    hey!

    Is anyone working on this issue yet?

    I already contributed to some React Native issues, but I'm new to Golang and want to learn more.

    Is it possible for me to tackle this?

    It probably needs to modify two projects for this one, correct me if I'm wrong.

    Mattermost System Console (the web project)

    • Add a new field on the Bitbucket Plugins Page called something like "Bitbucket URL (Self-Hosted)"
    image

    Mattermost Bitbucket Plugin

    • Extend the code to accept this new field and create the necessary to store this on the database.

    I'll wait for your consideration :)

  3. mickmister commented on Aug 7, 2023

    @mickmister
    ContributorAuthor

    Hey @panoramix360! Thanks so much for your contributions 🙂 Indeed this ticket is currently up for grabs, so I will assign you to the ticket 👍

    It probably needs to modify two projects for this one, correct me if I'm wrong.

    Fortunately, plugins are generally decoupled from the rest of the application (the beauty of plugin architecture), so the settings are actually all defined in the bitbucket plugin repo in this file https://github.com/mattermost/mattermost-plugin-bitbucket/blob/master/plugin.json

    Extend the code to accept this new field and create the necessary to store this on the database.

    Indeed this is where most of the design of the feature comes in. I believe there are a few places where the plugin assumes it is working with Bitbucket Cloud, and we'll need to adjust the plugin to take this new config setting into account. Maybe no changes to the database are needed for this improvement.

    If you have any questions regarding plugin tooling in general (troubleshooting or other questions), feel free to join the Toolkit channel on our community server https://community.mattermost.com/core/channels/developer-toolkit. Thanks for your interest in contributing to this feature @panoramix360!

  4. panoramix360 commented on Aug 7, 2023

    @panoramix360

    hey @mickmister!

    Nice architecture! I'll read the links, thank you for detailing the issue.

    I'll join the channel! And thank you again for this :)

  5. jprusch commented on Aug 9, 2023

    @jprusch
    Contributor

    I follow & am able to test stuff on short term notice.... We're running a Bitbucket 8.10.1 server right now & also an internal Bamboo server. Bamboo / Bitbucket already send messages to Mattermost using the JSoft Mattermost Connector for Bitbucket & IBMs Slack Notifications for Bamboo. I'd love to see native support from Mattermost for these tools...

  6. panoramix360 commented on Aug 9, 2023

    @panoramix360

    hey @jprusch! great :D once I have some simple implementation ready, I'll let you know so we can test this.

    Thank you for being willing to test it!

  7. jprusch commented on Aug 9, 2023

    @jprusch
    Contributor

    Sure! Glad to support

  8. panoramix360 commented on Aug 18, 2023

    @panoramix360

    hey guys!

    To give you an update, I already created the new setting on the plugin that will be called Bitbucket Self-hosted Url, let me know what you think.

    {
        "key": "BitbucketSelfHostedUrl",
        "display_name": "Bitbucket Self-hosted Url",
        "type": "text",
        "help_text": "(Optional) Set to change the default bitbucket URL to a self-hosted one.",
        "placeholder": "",
        "default": null
    }
    

    The idea is to be an optional config inside the plugin configuration.

    It took a little while to understand the structure and code of the plugin, so I believe now it will be faster to make the necessary changes.

    I'll try to begin testing locally with a Bitbucket Server on Docker to look for bugs and problems. And following @mickmister idea, I'll create a docker-compose to up this container.

    I'm thinking of adding a validation as well on the Config if the URL is set, I'll try to check if it's a valid URL before continuing with the plugin OnActivate method.

  9. mickmister commented on Aug 18, 2023

    @mickmister
    ContributorAuthor

    Hi @panoramix360, awesome work! This all looks good to me 👍

    Are you able to create a draft PR to continue our discussion there? It makes it much easier to discuss code changes and strategies in the PR that has the changes. What do you think?

  10. jprusch commented on Aug 18, 2023

    @jprusch
    Contributor

    Hi,

    Perfect!

    Will try on Monday & post some feedback.

    JP

  11. panoramix360 commented on Oct 4, 2023

    @panoramix360

    hey!

    Just to give an update about this open issue.

    @mickmister and I tried a lot of approaches to make the current implementation work for Bitbucket Server (v1 API).

    Unfortunately, we reached the conclusion that it's not possible with the current code of the plugin using the go-bitbucket library only.

    But not all hope is lost!! :D

    We are discussing and will probably create more issues on the mattermost-plugin-bitbucket repo to refactor/implement on the current code so we can have a way to support Bitbucket Server, just will take a little longer, but we are getting there!

    Thank you!

    cc: @jprusch @mickmister

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions