feat: gitlab triggers integration

This commit is contained in:
Krzysztof Dukszta-Kwiatkowski
2023-05-15 11:22:37 +02:00
committed by Ali BARIN
parent 93a2e2151e
commit 3f8f022d48
45 changed files with 2130 additions and 12 deletions

View File

@@ -0,0 +1,14 @@
import { TBeforeRequest } from '@automatisch/types';
const addAuthHeader: TBeforeRequest = ($, requestConfig) => {
if ($.auth.data.oInstanceUrl) {
requestConfig.baseURL = $.auth.data.oInstanceUrl as string;
}
if (requestConfig.headers && $.auth.data?.accessToken) {
requestConfig.headers.Authorization = `Bearer ${$.auth.data.accessToken}`;
}
return requestConfig;
};
export default addAuthHeader;