mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
features: support jira self-hosted server
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import {
|
||||
import {
|
||||
OptionsWithUri,
|
||||
} from 'request';
|
||||
|
||||
@@ -9,13 +9,19 @@ import {
|
||||
ILoadOptionsFunctions,
|
||||
} from 'n8n-core';
|
||||
|
||||
import {
|
||||
import {
|
||||
IDataObject,
|
||||
ICredentialDataDecryptedObject,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
export async function jiraSoftwareCloudApiRequest(this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, endpoint: string, method: string, body: any = {}, query?: IDataObject, uri?: string): Promise<any> { // tslint:disable-line:no-any
|
||||
let data; let domain;
|
||||
const jiraCloudCredentials = this.getCredentials('jiraSoftwareCloudApi');
|
||||
let jiraCloudCredentials: ICredentialDataDecryptedObject | undefined;
|
||||
try {
|
||||
jiraCloudCredentials = this.getCredentials('jiraSoftwareCloudApi');
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
const jiraServerCredentials = this.getCredentials('jiraSoftwareServerApi');
|
||||
if (jiraCloudCredentials === undefined && jiraServerCredentials === undefined) {
|
||||
throw new Error('No credentials got returned!');
|
||||
|
||||
Reference in New Issue
Block a user