import envVars from "../config/env" ; import axios from "axios" ; export const getJiraAppUrl = ( jiraHost ) : string => jiraHost ?. length ? `${ jiraHost }/plugins/servlet/ac/com.github.integration.${ envVars . INSTANCE_NAME }/github-post-install-page` : "" ; export const getJiraMarketplaceUrl = ( jiraHost ) : string => jiraHost ?. length ? `${ jiraHost }/jira/marketplace/discover/app/com.github.integration.production` : "" ; export const jiraSiteExists = async ( jiraHost ) : Promise < boolean > => { if ( ! jiraHost ?. length ) { return false ; } return axios ( `${ jiraHost }/status` , { method : "GET" , headers : { "content-type" : "application/json" } } ) . then ( ( ) => true , ( ) => false ) ; } ;