-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add Azure DevOps integration #20202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Add Azure DevOps integration #20202
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
a14f259
Add node package
mustard-mh ae5fd77
first nit changes
mustard-mh fe82871
nit proto udpate
mustard-mh 11b738f
fixup
mustard-mh 11d18a8
[server] add azure support
mustard-mh 31939b8
fixup
mustard-mh f22d0a3
fixup
mustard-mh 6ca56e4
server fixup
mustard-mh fadcb32
[dashboard] changes
mustard-mh 4bcaa90
fixup
mustard-mh de778be
fixup
mustard-mh f4b6b74
Fix server bugs
mustard-mh 393ff4e
Fixup
mustard-mh b33e0ca
Fix dashboard
mustard-mh 262eb92
Fix user integration
mustard-mh fd55a59
Fix permission update modal
mustard-mh 86450c5
tmp
mustard-mh 7671046
Add unit tests and fix get file content issue
mustard-mh 5abff76
Add readme
mustard-mh 4a1b42a
fix tag and branch parser
mustard-mh 33c9ed6
Update README.md
mustard-mh 80a595a
Remove API tests
mustard-mh ee1effd
Disable azure devops support for PAYG
mustard-mh 2696492
Revert "Remove API tests"
mustard-mh 6563f4f
Fix tests
mustard-mh 8ed2ce3
Rebase fixup
mustard-mh c4e75c0
nit fixing
mustard-mh 189c431
revert me
mustard-mh 375d891
Fix integration udpate
mustard-mh cea6946
Fix ENT-780
mustard-mh f5467ab
Don't support azure devops on PAYG
mustard-mh 4d5d4f0
dashboard: add comments and remove new Azure DevOps supports on user …
mustard-mh f33d5a3
Fix push warning and make project a part of owner
mustard-mh bae8f0a
Proper handle errors
mustard-mh 87afe7f
Fix token can't refresh issue
mustard-mh 8a0e87f
Fix api
mustard-mh e621899
Add project context supports
mustard-mh ce12d3d
Update components/server/src/azure-devops/azure-context-parser.spec.ts
mustard-mh ac749a4
Fix readablestream error
mustard-mh be43556
Fix clone url
mustard-mh d5ff0f3
Address feedback
mustard-mh 0314a7d
1
mustard-mh 2ac4ecd
avatar
mustard-mh d7f086d
Revert "revert me"
mustard-mh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.