-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updating .gitignore and pushing the released files, adding git clients
- Loading branch information
Petr Nechvátal
committed
Apr 25, 2023
1 parent
c61b832
commit 0650fba
Showing
12 changed files
with
9,799 additions
and
5 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
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,39 @@ | ||
# coding=utf-8 | ||
|
||
from msrest.universal_http import ClientRequest | ||
from .git_client_base import GitClientBase | ||
|
||
|
||
class GitClient(GitClientBase): | ||
"""Git | ||
:param str base_url: Service URL | ||
:param Authentication creds: Authenticated credentials. | ||
""" | ||
|
||
def __init__(self, base_url=None, creds=None): | ||
super(GitClient, self).__init__(base_url, creds) | ||
|
||
def get_vsts_info(self, relative_remote_url): | ||
url = self._client.format_url(relative_remote_url.rstrip('/') + '/vsts/info') | ||
request = ClientRequest(method='GET', url=url) | ||
headers = {'Accept': 'application/json'} | ||
if self._suppress_fedauth_redirect: | ||
headers['X-TFS-FedAuthRedirect'] = 'Suppress' | ||
if self._force_msa_pass_through: | ||
headers['X-VSS-ForceMsaPassThrough'] = 'true' | ||
response = self._send_request(request, headers) | ||
return self._deserialize('VstsInfo', response) | ||
|
||
@staticmethod | ||
def get_vsts_info_by_remote_url(remote_url, credentials, | ||
suppress_fedauth_redirect=True, | ||
force_msa_pass_through=True): | ||
request = ClientRequest(method='GET', url=remote_url.rstrip('/') + '/vsts/info') | ||
headers = {'Accept': 'application/json'} | ||
if suppress_fedauth_redirect: | ||
headers['X-TFS-FedAuthRedirect'] = 'Suppress' | ||
if force_msa_pass_through: | ||
headers['X-VSS-ForceMsaPassThrough'] = 'true' | ||
git_client = GitClient(base_url=remote_url, creds=credentials) | ||
response = git_client._send_request(request, headers) | ||
return git_client._deserialize('VstsInfo', response) |
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,39 @@ | ||
# coding=utf-8 | ||
|
||
from msrest.universal_http import ClientRequest | ||
from .git_client_base import GitClientBase | ||
|
||
|
||
class GitClient(GitClientBase): | ||
"""Git | ||
:param str base_url: Service URL | ||
:param Authentication creds: Authenticated credentials. | ||
""" | ||
|
||
def __init__(self, base_url=None, creds=None): | ||
super(GitClient, self).__init__(base_url, creds) | ||
|
||
def get_vsts_info(self, relative_remote_url): | ||
url = self._client.format_url(relative_remote_url.rstrip('/') + '/vsts/info') | ||
request = ClientRequest(method='GET', url=url) | ||
headers = {'Accept': 'application/json'} | ||
if self._suppress_fedauth_redirect: | ||
headers['X-TFS-FedAuthRedirect'] = 'Suppress' | ||
if self._force_msa_pass_through: | ||
headers['X-VSS-ForceMsaPassThrough'] = 'true' | ||
response = self._send_request(request, headers) | ||
return self._deserialize('VstsInfo', response) | ||
|
||
@staticmethod | ||
def get_vsts_info_by_remote_url(remote_url, credentials, | ||
suppress_fedauth_redirect=True, | ||
force_msa_pass_through=True): | ||
request = ClientRequest(method='GET', url=remote_url.rstrip('/') + '/vsts/info') | ||
headers = {'Accept': 'application/json'} | ||
if suppress_fedauth_redirect: | ||
headers['X-TFS-FedAuthRedirect'] = 'Suppress' | ||
if force_msa_pass_through: | ||
headers['X-VSS-ForceMsaPassThrough'] = 'true' | ||
git_client = GitClient(base_url=remote_url, creds=credentials) | ||
response = git_client._send_request(request, headers) | ||
return git_client._deserialize('VstsInfo', response) |
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,115 @@ | ||
# -------------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
# -------------------------------------------------------------------------------------------- | ||
# Generated file, DO NOT EDIT | ||
# Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
# -------------------------------------------------------------------------------------------- | ||
|
||
from .models import * | ||
from .release_client import ReleaseClient | ||
|
||
__all__ = [ | ||
'AgentArtifactDefinition', | ||
'ApprovalOptions', | ||
'Artifact', | ||
'ArtifactMetadata', | ||
'ArtifactSourceReference', | ||
'ArtifactTriggerConfiguration', | ||
'ArtifactTypeDefinition', | ||
'ArtifactVersion', | ||
'ArtifactVersionQueryResult', | ||
'AuthorizationHeader', | ||
'AutoTriggerIssue', | ||
'BuildVersion', | ||
'ComplianceSettings', | ||
'Condition', | ||
'ConfigurationVariableValue', | ||
'DataSourceBindingBase', | ||
'DefinitionEnvironmentReference', | ||
'Deployment', | ||
'DeploymentAttempt', | ||
'DeploymentJob', | ||
'DeploymentQueryParameters', | ||
'EmailRecipients', | ||
'EnvironmentExecutionPolicy', | ||
'EnvironmentOptions', | ||
'EnvironmentRetentionPolicy', | ||
'EnvironmentTrigger', | ||
'FavoriteItem', | ||
'Folder', | ||
'GateUpdateMetadata', | ||
'GraphSubjectBase', | ||
'Change', | ||
'IdentityRef', | ||
'IgnoredGate', | ||
'InputDescriptor', | ||
'InputValidation', | ||
'InputValue', | ||
'InputValues', | ||
'InputValuesError', | ||
'InputValuesQuery', | ||
'Issue', | ||
'MailMessage', | ||
'ManualIntervention', | ||
'ManualInterventionUpdateMetadata', | ||
'Metric', | ||
'OrgPipelineReleaseSettings', | ||
'OrgPipelineReleaseSettingsUpdateParameters', | ||
'PipelineProcess', | ||
'ProcessParameters', | ||
'ProjectPipelineReleaseSettings', | ||
'ProjectPipelineReleaseSettingsUpdateParameters', | ||
'ProjectReference', | ||
'QueuedReleaseData', | ||
'ReferenceLinks', | ||
'Release', | ||
'ReleaseApproval', | ||
'ReleaseApprovalHistory', | ||
'ReleaseCondition', | ||
'ReleaseDefinition', | ||
'ReleaseDefinitionApprovals', | ||
'ReleaseDefinitionApprovalStep', | ||
'ReleaseDefinitionDeployStep', | ||
'ReleaseDefinitionEnvironment', | ||
'ReleaseDefinitionEnvironmentStep', | ||
'ReleaseDefinitionEnvironmentSummary', | ||
'ReleaseDefinitionEnvironmentTemplate', | ||
'ReleaseDefinitionGate', | ||
'ReleaseDefinitionGatesOptions', | ||
'ReleaseDefinitionGatesStep', | ||
'ReleaseDefinitionRevision', | ||
'ReleaseDefinitionShallowReference', | ||
'ReleaseDefinitionSummary', | ||
'ReleaseDefinitionUndeleteParameter', | ||
'ReleaseDeployPhase', | ||
'ReleaseEnvironment', | ||
'ReleaseEnvironmentShallowReference', | ||
'ReleaseEnvironmentUpdateMetadata', | ||
'ReleaseGates', | ||
'ReleaseReference', | ||
'ReleaseRevision', | ||
'ReleaseSettings', | ||
'ReleaseShallowReference', | ||
'ReleaseSchedule', | ||
'ReleaseStartEnvironmentMetadata', | ||
'ReleaseStartMetadata', | ||
'ReleaseTask', | ||
'ReleaseTaskAttachment', | ||
'ReleaseUpdateMetadata', | ||
'ReleaseWorkItemRef', | ||
'RetentionPolicy', | ||
'RetentionSettings', | ||
'SourcePullRequestVersion', | ||
'SummaryMailSection', | ||
'TaskInputDefinitionBase', | ||
'TaskInputValidation', | ||
'TaskSourceDefinitionBase', | ||
'VariableGroup', | ||
'VariableGroupProjectReference', | ||
'VariableGroupProviderData', | ||
'VariableValue', | ||
'WorkflowTask', | ||
'WorkflowTaskReference', | ||
'ReleaseClient' | ||
] |
Oops, something went wrong.