Can multiple Jira addons can use same source code?

16 views Asked by At

I have two products which have same functionalities, almost same APIs but different UI.Inorder to avoid the code duplication, I would like to use same code for both application. Is there any way to do this in Java Spring-Boot? I'm using: atlassian-connect-spring-boot-starter and atlassian-connect-spring-boot-jpa-starter my addon look like:

{
  "key": "${addon.app1-key}",
  "baseUrl": "${addon.app1-base-url}",
  "name": "app1",
  "authentication": {
    "type": "jwt"
  },
  "lifecycle": {
    "installed": "/installed",
    "uninstalled": "/uninstalled"
  },
  "modules": {
    "generalPages": [
      {
        "key": "landing-page",
        "location": "system.top.navigation.bar",
        "name": {
          "value": "app1"
        },
        "url": "/collaboratorlogin",
        "conditions": [
          {
            "and": [
              {
                "condition": "user_is_admin",
                "invert": true
              }
            ]
          },
          {
            "condition": "user_is_logged_in"
          }
        ]
      },
      {
        "key": "admin-page",
        "location": "system.top.navigation.bar",
        "name": {
          "value": "Manage app1"
        },
        "url": "/adminpage",
        "conditions": [
          {
            "condition": "user_is_admin"
          }
        ]
      }
    ],
    "postInstallPage": {
      "url": "/home",
      "name": {
        "value": "Home Page",
        "i18n": "homepage.name"
      },
      "key": "home-page"
    },
    "webhooks": [
      {
        "event": "jira:issue_created",
        "url": "/wh/issue_created"
      },
      {
        "event": "jira:issue_updated",
        "url": "/wh/issue_updated"
      }
    ]
  },
  "scopes": [
    "READ",
    "ADMIN",
    "WRITE",
    "ACT_AS_USER"
  ]
}

I would like to use one more addon like this but atlassian-connect-starter preventing me to this. Can I customize the starter?

0

There are 0 answers