mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-12 16:08:48 +00:00
Add Azure DevOps (#1715)
* add azure pullrequrests * add creatorId * rename azurePullrequests->azurePullRequests * pass creatorId to FE * expose userEmail to frontend * tolower * remove unused code * merge to AzureDevOps * fix userEmail * remove whitespace in const and set true endpoint in widget * use widget params in endpoint * change approvedNotCompleted to Approved * change to lower * rename * rename * merge widgets together * limit pipeline result to 1 result * Better handle azuredevops PR call failures * change to have repositoryId and not branchName * Fix field filtering, avoid PR call if not needed --------- Co-authored-by: Nitzan Miranda <Nitzan.Miranda@bagirasys.com> Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
This commit is contained in:
parent
ac61dc5d0c
commit
7e05adc02a
10 changed files with 100 additions and 51 deletions
|
@ -293,6 +293,8 @@ export function cleanServiceGroups(groups) {
|
|||
node, // Proxmox
|
||||
snapshotHost, // kopia
|
||||
snapshotPath,
|
||||
userEmail, // azuredevops
|
||||
repositoryId
|
||||
} = cleanedService.widget;
|
||||
|
||||
let fieldsList = fields;
|
||||
|
@ -312,6 +314,11 @@ export function cleanServiceGroups(groups) {
|
|||
service_group: serviceGroup.name,
|
||||
};
|
||||
|
||||
if (type === "azuredevops") {
|
||||
if (userEmail) cleanedService.widget.userEmail = userEmail;
|
||||
if (repositoryId) cleanedService.widget.repositoryId = repositoryId;
|
||||
}
|
||||
|
||||
if (type === "coinmarketcap") {
|
||||
if (currency) cleanedService.widget.currency = currency;
|
||||
if (symbols) cleanedService.widget.symbols = symbols;
|
||||
|
|
|
@ -5,7 +5,7 @@ export function formatApiCall(url, args) {
|
|||
return args[key] || "";
|
||||
};
|
||||
|
||||
return url.replace(/\/+$/, "").replace(find, replace);
|
||||
return url.replace(/\/+$/, "").replace(find, replace).replace(find,replace);
|
||||
}
|
||||
|
||||
function getURLSearchParams(widget, endpoint) {
|
||||
|
|
|
@ -62,7 +62,7 @@ export default async function credentialedProxyHandler(req, res, map) {
|
|||
headers.Authorization = `Basic ${Buffer.from(`${widget.username}:${widget.password}`).toString("base64")}`;
|
||||
}
|
||||
}
|
||||
else if (widget.type === "azurePipelines") {
|
||||
else if (widget.type === "azuredevops") {
|
||||
headers.Authorization = `Basic ${Buffer.from(`$:${widget.key}`).toString("base64")}`;
|
||||
} else {
|
||||
headers["X-API-Key"] = `${widget.key}`;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue