-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Azure DevOps integration (#20202)
* Add node package * first nit changes * nit proto udpate * fixup * [server] add azure support * fixup * fixup * server fixup * [dashboard] changes * fixup * fixup * Fix server bugs * Fixup * Fix dashboard * Fix user integration * Fix permission update modal * tmp * Add unit tests and fix get file content issue * Add readme * fix tag and branch parser * Update README.md * Remove API tests * Disable azure devops support for PAYG * Revert "Remove API tests" This reverts commit a525cbd. * Fix tests * Rebase fixup * nit fixing * revert me * Fix integration udpate * Fix ENT-780 * Don't support azure devops on PAYG * dashboard: add comments and remove new Azure DevOps supports on user settings page * Fix push warning and make project a part of owner * Proper handle errors * Fix token can't refresh issue * Fix api * Add project context supports * Update components/server/src/azure-devops/azure-context-parser.spec.ts Co-authored-by: Filip Troníček <[email protected]> * Fix readablestream error * Fix clone url * Address feedback - dashboard provider type update - doc for checkWriteAccess - Requirement.DEFAULT * 1 * avatar * Revert "revert me" This reverts commit 189c431. --------- Co-authored-by: Filip Troníček <[email protected]>
- Loading branch information
1 parent
9e0f6e1
commit 41f47c8
Showing
42 changed files
with
3,090 additions
and
175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
components/dashboard/src/data/auth-providers/auth-provider-options-query.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/** | ||
* Copyright (c) 2024 Gitpod GmbH. All rights reserved. | ||
* Licensed under the GNU Affero General Public License (AGPL). | ||
* See License.AGPL.txt in the project root for license information. | ||
*/ | ||
|
||
import { AuthProviderType } from "@gitpod/public-api/lib/gitpod/v1/authprovider_pb"; | ||
import { isGitpodIo } from "../../utils"; | ||
import { useMemo } from "react"; | ||
|
||
const optionsForPAYG = [ | ||
{ type: AuthProviderType.GITHUB, label: "GitHub" }, | ||
{ type: AuthProviderType.GITLAB, label: "GitLab" }, | ||
{ type: AuthProviderType.BITBUCKET_SERVER, label: "Bitbucket Server" }, | ||
{ type: AuthProviderType.BITBUCKET, label: "Bitbucket Cloud" }, | ||
]; | ||
|
||
const optionsForEnterprise = [...optionsForPAYG, { type: AuthProviderType.AZURE_DEVOPS, label: "Azure DevOps" }]; | ||
|
||
export const isSupportAzureDevOpsIntegration = () => { | ||
return isGitpodIo(); | ||
}; | ||
|
||
export const useAuthProviderOptionsQuery = (isOrgLevel: boolean) => { | ||
return useMemo(() => { | ||
const isPAYG = isGitpodIo(); | ||
// Azure DevOps is not supported for PAYG users and is only available for org-level integrations | ||
// because auth flow is identified by auth provider's host, which will always be `dev.azure.com` | ||
// | ||
// Don't remove this until we can setup an generial application for Azure DevOps (investigate needed) | ||
if (isPAYG || !isOrgLevel) { | ||
return optionsForPAYG; | ||
} | ||
return optionsForEnterprise; | ||
}, [isOrgLevel]); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.