@evidenceai/gitlab
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -7,3 +7,14 @@ export interface GitlabContactRequest { | ||
} | ||
export declare const isGitlabIntegrationConfigured: () => Promise<boolean>; | ||
interface GitlabConfigurationResult { | ||
isConfigured: boolean; | ||
options: { | ||
host?: string; | ||
hasToken: boolean; | ||
projectId: string; | ||
}; | ||
} | ||
export declare function isGitlabIntegrationConfigured(getDetails?: true): Promise<GitlabConfigurationResult>; | ||
export declare function isGitlabIntegrationConfigured(getDetails?: false): Promise<boolean>; | ||
export declare function isGitlabIntegrationConfigured(getDetails?: boolean): Promise<boolean | GitlabConfigurationResult>; | ||
export declare const submitContactRequest: (contactRequest: GitlabContactRequest) => Promise<string>; | ||
export {}; |
@@ -68,9 +68,16 @@ "use strict"; | ||
}; | ||
const isGitlabIntegrationConfigured = async () => { | ||
async function isGitlabIntegrationConfigured(getDetails) { | ||
const config = getGitlabConfiguration(false); | ||
const isConfigured = Boolean(config.privateToken && | ||
config.gitlabHost && | ||
config.contactRequestsProjectId); | ||
const isConfigured = Boolean(config.privateToken && config.gitlabHost && config.contactRequestsProjectId); | ||
if (getDetails) | ||
return { | ||
isConfigured: isConfigured, | ||
options: { | ||
hasToken: Boolean(config.privateToken), | ||
host: config.gitlabHost, | ||
projectId: config.contactRequestsProjectId, | ||
}, | ||
}; | ||
return isConfigured; | ||
}; | ||
} | ||
exports.isGitlabIntegrationConfigured = isGitlabIntegrationConfigured; | ||
@@ -77,0 +84,0 @@ /* |
{ | ||
"name": "@evidenceai/gitlab", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "A package to manipulate Gitlab API", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9980
192