feat(Jira Software Node): Personal Access Token credential type (#11038)

This commit is contained in:
Gerard de Vries
2025-01-22 12:43:13 +01:00
committed by GitHub
parent 69c2153279
commit 1c7a38f6ba
5 changed files with 92 additions and 11 deletions

View File

@@ -28,6 +28,9 @@ export async function jiraSoftwareCloudApiRequest(
if (jiraVersion === 'server') {
domain = (await this.getCredentials('jiraSoftwareServerApi')).domain as string;
credentialType = 'jiraSoftwareServerApi';
} else if (jiraVersion === 'serverPat') {
domain = (await this.getCredentials('jiraSoftwareServerPatApi')).domain as string;
credentialType = 'jiraSoftwareServerPatApi';
} else {
domain = (await this.getCredentials('jiraSoftwareCloudApi')).domain as string;
credentialType = 'jiraSoftwareCloudApi';
@@ -233,7 +236,7 @@ export async function getUsers(this: ILoadOptionsFunctions): Promise<INodeProper
const query: IDataObject = { maxResults };
let endpoint = '/api/2/users/search';
if (jiraVersion === 'server') {
if (jiraVersion === 'server' || jiraVersion === 'serverPat') {
endpoint = '/api/2/user/search';
query.username = "'";
}