Revert "Implement project pulling from Azure DevOps using Service Pri… (#14977)

Revert "Implement project pulling from Azure DevOps using Service Principals (#14628)"

This reverts commit 2e2cd7f2de.
This commit is contained in:
Hao Liu
2024-03-11 10:05:24 -04:00
committed by GitHub
parent ee9eac15dc
commit b076cb00a9
7 changed files with 9 additions and 49 deletions

View File

@@ -50,7 +50,7 @@ class Project(HasCopy, HasCreate, HasNotifications, UnifiedJobTemplate):
def create_payload(self, name='', description='', scm_type='git', scm_url='', scm_branch='', organization=Organization, credential=None, **kwargs):
if credential:
if isinstance(credential, Credential):
if credential.ds.credential_type.namespace not in ('scm', 'insights', 'azure_rm'):
if credential.ds.credential_type.namespace not in ('scm', 'insights'):
credential = None # ignore incompatible credential from HasCreate dependency injection
elif credential in (Credential,):
credential = (Credential, dict(credential_type=(True, dict(kind='scm'))))