Bitbucket cloud descriptor

123 views
Skip to first unread message

Iñigo Gonzalez

unread,
Apr 26, 2016, 9:23:10 AM4/26/16
to Atlassian Connect Dev
Hi, I am developing an Add-on for bitbucket cloud and I am having some issues on adding a general page. To do this I have followed this guide: https://developer.atlassian.com/bitbucket/modules/generalPages.html

In my descriptor I have a section like this: 

"generalPages": [
   
{
       
"key": "addon-dialog",
        "url": "/bitbucket/dialog",
        "name": {
           
"value": "Canvas Dialog"
        }
   
},
    {
       
"key": "addon-manage",
        "url": "/board/manage",
        "name": {
           
"value": "Manage Addon"
        },
        "location": "org.bitbucket.repository.actions",
        "conditions" : [
           
{
               
"condition": "user_is_logged_in"
            }
       
]
   
}
]

With this in the descriptor, when I install the plugin in bitbucket, it returns the next error: 

The add-on server returned invalid data. Please contact the add-on vendor for help. Here's the error we encountered - Invalid JSON: Additional properties are not allowed (u'location' was unexpected) at modules.generalPages.1
 
If I remove the location section it installs correctly, but the pages (addon-dialog and addon-manage) don't exist. Also I have tried using generalPage instead of generalPages and the bitbucket doesn't return any error, but it continues without the pages.

Is there any problem with generalPages in bitbucket? How can I solve this problem?

Thank you!!

Khanh Nguyen

unread,
May 3, 2016, 1:34:13 AM5/3/16
to Atlassian Connect Dev
Hi Iñigo Gonzalez,

Unfortunately, it seems like generalPages is currently not supported in Bitbucket Connect and it is an error in our documentation.

Instead, you can use repoPage for the addon-manage page, or the options such as admin page or configure page.
 
"repoPage": [
    {
        "url": "/board/manage?repoPath={repo_path}",
        "name": {
            "value": "Manage Addon"
        },
        "location": "org.bitbucket.repository.actions",
        "key": "addon-manage",
        "params": {
            "auiIcon": "aui-iconfont-configure"
        },
        "conditions" : [
            {
                "condition": "user_is_logged_in"
            }
        ]
    }
]

Support for dialogs only seem to be supported for webItems at the moment. See:
Reply all
Reply to author
Forward
0 new messages