• Icon: Suggestion Suggestion
    • Resolution: Low Engagement
    • None
    • None
    • 24
    • We collect Bitbucket feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      Atlassian status as of Mar 2022

      Hi everyone,

      Thanks for your feedback, passion, and advocacy for this suggestion. Please accept our apologies for allowing this issue to remain open without a clear answer from us.

      If FishEye and Bitbucket Data Center are already integrated, you can easily add individual Bitbucket Repositories to FishEye. However, further development of Fisheye integration is not aligning with our priorities. We remain committed to being an open company, whether it's with regards to feature requests or bugs in our software. 

      What are we doing instead? We remain committed to helping software teams deliver high-quality software faster in an increasingly competitive world. We believe that great developer tools are a key element of modern software development. To that end, we've made a lot of improvements last year and are planning to work in the following areas that help with problems development teams face now:

      • Performance and scaling to support growth
      • Security and compliance features
      • Innovations around developer productivity
      • Integrations between Atlassian and other leading products

      Cheers,

      Anton Genkin
      Product Manager - Bitbucket Data Center & Server

      Original request description

      I don't really want to have to manually create FishEye projects for every repo in Stash. A way to populate FishEye when a repo is created in Stash would be nice...or at least some very easy way to do it (ideally one that doesn't involve an administrator).

      Workaround

      Use Fisheye's REST APIs to add repositories and set up their permissions:

      /rest-service-fecru/admin/repositories
      /rest-service-fecru/admin/repositories/<repository>/permissions
      /rest-service-fecru/admin/repositories/<repository>/permissions/groups

      References:

            [BSERV-2589] Automatically add repositories to FishEye

            Atlassian Update - 15 April 2025

            Hello,

            Thank you for submitting this suggestion. We appreciate you taking the time to share your ideas for improving our products, as many features and functions come from valued customers such as yourself.

            Atlassian is committed to enhancing the security and compliance of our Data Center products, with an emphasis on sustainable scalability and improving the product experience for both administrators and end-users. We periodically review older suggestions to ensure we're focusing on the most relevant feedback. This suggestion is being closed due to a lack of engagement in the last four years, including no new watchers, votes, or comments. This inactivity suggests a low impact. Therefore, this suggestion is not in consideration for our future roadmap.

            Please note the comments on this thread are not being monitored.

            You can read more about our approach to highly voted suggestions here and how we prioritize what to implement here.

            To learn more about our recent investments in Bitbucket Data Center, please check our public roadmap and our dashboards, which contain recently resolved issues.

            Kind regards,
            Bitbucket Data Center

            Ishwinder Kaur added a comment - Atlassian Update - 15 April 2025 Hello, Thank you for submitting this suggestion. We appreciate you taking the time to share your ideas for improving our products, as many features and functions come from valued customers such as yourself. Atlassian is committed to enhancing the security and compliance of our Data Center products, with an emphasis on sustainable scalability and improving the product experience for both administrators and end-users. We periodically review older suggestions to ensure we're focusing on the most relevant feedback. This suggestion is being closed due to a lack of engagement in the last four years , including no new watchers, votes, or comments. This inactivity suggests a low impact. Therefore, this suggestion is not in consideration for our future roadmap. Please note the comments on this thread are not being monitored. You can read more about our approach to highly voted suggestions here and how we prioritize what to implement here. To learn more about our recent investments in Bitbucket Data Center, please check our public roadmap and our dashboards, which contain recently resolved issues . Kind regards, Bitbucket Data Center

            This needs to happen, at least as a plugin.

            I really expected two Atlassian-products (Bitbucket and Fisheye) to seamless integration!

            Christian Jönsson added a comment - This needs to happen, at least as a plugin. I really expected two Atlassian-products (Bitbucket and Fisheye) to seamless integration!

            Please can you add this feature as it would be very useful.

            Mark Willis added a comment - Please can you add this feature as it would be very useful.

            Hi, this script works. It is a hack, but hey it works! We've been running it on a 30 min cron without complaint for months.

            This assumes you have fisheye 3.5.3. Earlier versions required a slightly different approach for adding repos. Likely works on newer.

            you will need simple json and you will need to replace USER, PWD and host names.

            the -t switch allows you to test it

            not supported

            #!/usr/bin/python
            # Created by Randy James, Senior Director for Zillow, Inc
            import os
            import urllib2
            import re
            import sys
            import base64
            import shutil
            import socket
            import simplejson as json
            
            # stash application setters
            stash_base_url = "https://stash/rest/api/1.0"
            stash_credentials = base64.b64encode('USER:PWD')
            stash_headers = {'Authorization':'Basic ' + stash_credentials, 'content-type':'application/json'}
            stash_data = None
            project_ignore_list = ['HACK','EXTCONFIG','EXTLIBS','EXTSERVICES','ST','PORTS']
            
            # fisheye application setters
            fe_base_url = "https://fisheye"
            fe_applinks_api_url = "/applinks/1.0"
            fe_rest_api_url = "/rest/api/1.0/rest-service"
            fe_data = None
            fe_credentials = base64.b64encode('USER:PWD')
            fe_headers = {'Authorization':'Basic ' + fe_credentials, 'content-type':'application/json','accept':'application/json'}
            
            def fe_get_repositories():
                # get repos
                repositories_list = []
                api_url = fe_base_url + '/rest/api/1.0/rest-service-fecru/admin/repositories?limit=1000&type=git'
                #api_url = fe_base_url + fe_rest_api_url + '-fe/repositories-v1'
                request = urllib2.Request(api_url, fe_data, fe_headers)
                response = urllib2.urlopen(request)
                repositories = json.loads(response.read())
                response.close()
                for repository in repositories['values']:
                    repositories_list.append(repository['name'].lower())
                if test==True: print str(repositories_list)
                return repositories_list
            
            def stash_get_projects():
                project_list = []
                request = urllib2.Request(stash_base_url + '/projects?limit=1000', stash_data, stash_headers)
                response = urllib2.urlopen(request)
                projects = json.loads(response.read())
                for project in projects['values']:
                    if project['key'] not in project_ignore_list:
            	    project_list.append(project['key'].lower())
                return project_list
            
            def stash_get_repositories(projects):
                repositories = []
                for p in projects:
                    request = urllib2.Request(stash_base_url + '/projects/' + p + '/repos?limit=1000', stash_data, stash_headers)
                    response = urllib2.urlopen(request)
                    repos = json.loads(response.read())
                    response.close()
                    for repository in repos['values']:
                        repositories.append(p + '.' + repository['name'].lower().replace(' ','-'))
                return repositories
            
            def compare_stash_fe_repo_lists(stash_repositories, fe_repositories):
                repos_to_add = []
                repos_to_delete = []
                # fe_r not in stash? Delete it.
                for fe_r in fe_repositories:
                    if fe_r not in stash_repositories:
                        repos_to_delete.append(fe_r)
                # s_r not in fisheye?  Add it.
                for s_r in stash_repositories:
                    if s_r not in fe_repositories:
                        repos_to_add.append(s_r)
                if test==True: print "add: " + str(repos_to_add)
                if test==True: print "del: " + str(repos_to_delete)
                return repos_to_add, repos_to_delete
            
            def fe_cleanup_deprecated_repos(repos_to_delete):
                fe_data = None
                for r in repos_to_delete:
                    # stop if running
                    api_url = (fe_base_url + '/rest/api/1.0/rest-service-fecru/admin/repositories/'
                        + r + '/stop')
                    request = urllib2.Request(api_url, fe_data, fe_headers)
                    request.get_method = lambda: 'PUT'
                    print "Stopping Repo: " + api_url
                    if test != True:
                        try:
                            urllib2.urlopen(request)
                        except urllib2.HTTPError, e:
                            print "Stoping Repo: " + r + "Failed.  See Response."
                            print e.code
                            return
            
                    # delete
                    api_url = fe_base_url + '/rest/api/1.0/rest-service-fecru/admin/repositories/' + r
                    request = urllib2.Request(api_url, fe_data, fe_headers)
                    request.get_method = lambda: 'DELETE'
                    print "Removing Repository Index for: " + r
                    if test != True:
                        try:
                            urllib2.urlopen(request)
                        except urllib2.HTTPError, e:
                            print "Deleting Repo: " + r + "Failed.  See Response."
                            print e.code
                            return
            
            def fe_create_repository(repos_to_add):
                repo_list = []
                for r in repos_to_add:
                    #dashed_repo = r.replace(' ','-')
                    dashed_repo = r
                    slashed_repo = dashed_repo.replace('.','/',1)
                    stash_repo_url = 'https://stash-api@stash/scm/' + slashed_repo + '.git'
                    api_url = (fe_base_url + '/rest-service-fecru/admin/repositories')
                    fe_data = json.dumps({ "type" : "git",
                                 "name" : dashed_repo,
                                 "description" : "",
                                 "storeDiff" : "true",
                                 "enabled" : "true",
                                 "git" : { "location" : stash_repo_url,
                                 "auth" : { "authType" : "password", "password" : "PWD" },
                                 "renameDetection" : "NONE" } })
            
                    print "Adding Repo: " + dashed_repo
                    request = urllib2.Request(api_url, fe_data, fe_headers)
                    request.get_method = lambda: 'POST'
                    if test != True:
                        try:
                            urllib2.urlopen(request)
                            print "Added Repo: " + dashed_repo
                        except urllib2.HTTPError, e:
                            print "Adding Repo: " + dashed_repo + " failed.  See Response."
                            print e.code
                            # stop and return
                            return
            
                    print "Starting Repo: " + dashed_repo
                    api_url = (fe_base_url + '/rest/api/1.0/rest-service-fecru/admin/repositories/'
                        + dashed_repo + '/start')
                    fe_data = None
                    request = urllib2.Request(api_url, fe_data, fe_headers)
                    request.get_method = lambda: 'PUT'
                    if test != True:
                        try:
                            urllib2.urlopen(request)
                            print "Started Repo: " + dashed_repo
                        except urllib2.HTTPError, e:
                            print "Starting new repo: " + dashed_repo + " failed. Please use fisheye admin to start."
                            print e.code
                            # continue with the remaining repos
                            pass
            
            # MAIN
            test = False
            if '-t' in (str(sys.argv)):
                print 'test true'
                test = True
            
            stash_projects = stash_get_projects()
            stash_repositories = stash_get_repositories(stash_projects)
            fe_repositories = fe_get_repositories()
            repos_to_add, repos_to_delete = compare_stash_fe_repo_lists(stash_repositories, fe_repositories)
            fe_cleanup_deprecated_repos(repos_to_delete)
            fe_create_repository(repos_to_add)
            

            Randy James added a comment - Hi, this script works. It is a hack, but hey it works! We've been running it on a 30 min cron without complaint for months. This assumes you have fisheye 3.5.3. Earlier versions required a slightly different approach for adding repos. Likely works on newer. you will need simple json and you will need to replace USER, PWD and host names. the -t switch allows you to test it not supported #!/usr/bin/python # Created by Randy James, Senior Director for Zillow, Inc import os import urllib2 import re import sys import base64 import shutil import socket import simplejson as json # stash application setters stash_base_url = "https: //stash/ rest /api/1.0" stash_credentials = base64.b64encode( 'USER:PWD' ) stash_headers = { 'Authorization' : 'Basic ' + stash_credentials, 'content-type' : 'application/json' } stash_data = None project_ignore_list = [ 'HACK' , 'EXTCONFIG' , 'EXTLIBS' , 'EXTSERVICES' , 'ST' , 'PORTS' ] # fisheye application setters fe_base_url = "https: //fisheye" fe_applinks_api_url = "/applinks/1.0" fe_rest_api_url = "/ rest /api/1.0/ rest -service" fe_data = None fe_credentials = base64.b64encode( 'USER:PWD' ) fe_headers = { 'Authorization' : 'Basic ' + fe_credentials, 'content-type' : 'application/json' , 'accept' : 'application/json' } def fe_get_repositories(): # get repos repositories_list = [] api_url = fe_base_url + '/ rest /api/1.0/ rest -service-fecru/admin/repositories?limit=1000&type=git' #api_url = fe_base_url + fe_rest_api_url + '-fe/repositories-v1' request = urllib2.Request(api_url, fe_data, fe_headers) response = urllib2.urlopen(request) repositories = json.loads(response.read()) response.close() for repository in repositories[ 'values' ]: repositories_list.append(repository[ 'name' ].lower()) if test==True: print str(repositories_list) return repositories_list def stash_get_projects(): project_list = [] request = urllib2.Request(stash_base_url + '/projects?limit=1000' , stash_data, stash_headers) response = urllib2.urlopen(request) projects = json.loads(response.read()) for project in projects[ 'values' ]: if project[ 'key' ] not in project_ignore_list: project_list.append(project[ 'key' ].lower()) return project_list def stash_get_repositories(projects): repositories = [] for p in projects: request = urllib2.Request(stash_base_url + '/projects/' + p + '/repos?limit=1000' , stash_data, stash_headers) response = urllib2.urlopen(request) repos = json.loads(response.read()) response.close() for repository in repos[ 'values' ]: repositories.append(p + '.' + repository[ 'name' ].lower().replace( ' ' , '-' )) return repositories def compare_stash_fe_repo_lists(stash_repositories, fe_repositories): repos_to_add = [] repos_to_delete = [] # fe_r not in stash? Delete it. for fe_r in fe_repositories: if fe_r not in stash_repositories: repos_to_delete.append(fe_r) # s_r not in fisheye? Add it. for s_r in stash_repositories: if s_r not in fe_repositories: repos_to_add.append(s_r) if test==True: print "add: " + str(repos_to_add) if test==True: print "del: " + str(repos_to_delete) return repos_to_add, repos_to_delete def fe_cleanup_deprecated_repos(repos_to_delete): fe_data = None for r in repos_to_delete: # stop if running api_url = (fe_base_url + '/ rest /api/1.0/ rest -service-fecru/admin/repositories/' + r + '/stop' ) request = urllib2.Request(api_url, fe_data, fe_headers) request.get_method = lambda: 'PUT' print "Stopping Repo: " + api_url if test != True: try : urllib2.urlopen(request) except urllib2.HTTPError, e: print "Stoping Repo: " + r + "Failed. See Response." print e.code return # delete api_url = fe_base_url + '/ rest /api/1.0/ rest -service-fecru/admin/repositories/' + r request = urllib2.Request(api_url, fe_data, fe_headers) request.get_method = lambda: 'DELETE' print "Removing Repository Index for : " + r if test != True: try : urllib2.urlopen(request) except urllib2.HTTPError, e: print "Deleting Repo: " + r + "Failed. See Response." print e.code return def fe_create_repository(repos_to_add): repo_list = [] for r in repos_to_add: #dashed_repo = r.replace( ' ' , '-' ) dashed_repo = r slashed_repo = dashed_repo.replace( '.' , '/' ,1) stash_repo_url = 'https: //stash-api@stash/scm/' + slashed_repo + '.git' api_url = (fe_base_url + '/ rest -service-fecru/admin/repositories' ) fe_data = json.dumps({ "type" : "git" , "name" : dashed_repo, "description" : "", "storeDiff" : " true " , "enabled" : " true " , "git" : { "location" : stash_repo_url, "auth" : { "authType" : "password" , "password" : "PWD" }, "renameDetection" : "NONE" } }) print "Adding Repo: " + dashed_repo request = urllib2.Request(api_url, fe_data, fe_headers) request.get_method = lambda: 'POST' if test != True: try : urllib2.urlopen(request) print "Added Repo: " + dashed_repo except urllib2.HTTPError, e: print "Adding Repo: " + dashed_repo + " failed. See Response." print e.code # stop and return return print "Starting Repo: " + dashed_repo api_url = (fe_base_url + '/ rest /api/1.0/ rest -service-fecru/admin/repositories/' + dashed_repo + '/start' ) fe_data = None request = urllib2.Request(api_url, fe_data, fe_headers) request.get_method = lambda: 'PUT' if test != True: try : urllib2.urlopen(request) print "Started Repo: " + dashed_repo except urllib2.HTTPError, e: print "Starting new repo: " + dashed_repo + " failed. Please use fisheye admin to start." print e.code # continue with the remaining repos pass # MAIN test = False if '-t' in (str(sys.argv)): print 'test true ' test = True stash_projects = stash_get_projects() stash_repositories = stash_get_repositories(stash_projects) fe_repositories = fe_get_repositories() repos_to_add, repos_to_delete = compare_stash_fe_repo_lists(stash_repositories, fe_repositories) fe_cleanup_deprecated_repos(repos_to_delete) fe_create_repository(repos_to_add)

            seanw88 added a comment -

            Plugin doesn't work for us on 3.5.2.

            seanw88 added a comment - Plugin doesn't work for us on 3.5.2.

            We need this functionality a lot.... With 1000+ SVN repos being migrated to GIT - we are looking at the integration between Stash and Fisheye. This should be possible to automate, to prevent all manuel processes.

            Please implement ASAP - so Stash can be an easy pick

            Kind regards
            Claus Nielsen

            Claus Nielsen added a comment - We need this functionality a lot.... With 1000+ SVN repos being migrated to GIT - we are looking at the integration between Stash and Fisheye. This should be possible to automate, to prevent all manuel processes. Please implement ASAP - so Stash can be an easy pick Kind regards Claus Nielsen

            The Plugin is no longer working for my 3.2.1 Installation.

            Michael Ruepp added a comment - The Plugin is no longer working for my 3.2.1 Installation.

            Christian Schulz added a comment - - edited

            I think a good approach is to delegate the decision to the project responsible (Project lead). He can activate an option we want use Crucible for Reviewing and then the Project is automatically created in Crucible (inclusive the scm connection).
            Another approach would be (if the administrator should do it) to give the possibility to have a functionality in the project admin summary called something like "Create Crucible connection".
            It would be good to use existing application links for such operations. But beware of the scm authentication in cases that the repository isn't lying on the same server (you can't use file path) there must be also an user generated to access the repository.

            Christian Schulz added a comment - - edited I think a good approach is to delegate the decision to the project responsible (Project lead). He can activate an option we want use Crucible for Reviewing and then the Project is automatically created in Crucible (inclusive the scm connection). Another approach would be (if the administrator should do it) to give the possibility to have a functionality in the project admin summary called something like "Create Crucible connection". It would be good to use existing application links for such operations. But beware of the scm authentication in cases that the repository isn't lying on the same server (you can't use file path) there must be also an user generated to access the repository.

            We solved that by creating a common fisheye user in Stash with Read permission in all Projects.

            Torben Rydiander added a comment - We solved that by creating a common fisheye user in Stash with Read permission in all Projects.

            This is kind of a big deal for those of us running both tools, and I'd venture that it should be higher than a "Minor" priority item. The big problem I see is that the current method of manually linking a Stash repository to FishEye requires inputting credentials of a user with Stash access. I'm not really comfortable with the linking of Stash and FishEye being reliant on a specific user's credentials (what if they change their password, etc.).

            dglick-sipc added a comment - This is kind of a big deal for those of us running both tools, and I'd venture that it should be higher than a "Minor" priority item. The big problem I see is that the current method of manually linking a Stash repository to FishEye requires inputting credentials of a user with Stash access. I'm not really comfortable with the linking of Stash and FishEye being reliant on a specific user's credentials (what if they change their password, etc.).

              Unassigned Unassigned
              4ec3495c6007 Jeff Mitchell
              Votes:
              105 Vote for this issue
              Watchers:
              59 Start watching this issue

                Created:
                Updated:
                Resolved: