internal static void ChangeBranchAttribute( RestApi restApi, string repoName, string branchName, string attributeName, string attributeValue) { ChangeAttributeRequest request = new ChangeAttributeRequest() { TargetType = AttributeTargetType.Branch, TargetName = branchName, Value = attributeValue }; restApi.ChangeAttribute(repoName, attributeName, request); }
public void ChangeAttribute( string repoName, string attributeName, ChangeAttributeRequest request) { Uri endpoint = ApiUris.GetFullUri( mBaseUri, ApiEndpoints.ChangeAttribute, repoName, attributeName); string actionDescription = string.Format( "set attribute '{0}@{1}' applied to {2} '{3}' to value '{4}'", attributeName, repoName, request.TargetType, request.TargetName, request.Value); Internal.MakeApiRequest <ChangeAttributeRequest>( endpoint, HttpMethod.Put, request, actionDescription, mApiKey); }
public void UpdateBranchAttribute(string repository, string branchFullName, string attrName, string attrValue) { string actionDescription = string.Format( "update attribute {0}={1} of branch {2}", attrName, attrValue, branchFullName); ChangeAttributeRequest request = new ChangeAttributeRequest() { TargetType = ChangeAttributeRequest.AttributeTargetType.Branch, TargetName = branchFullName, Value = attrValue }; Uri endpoint = ApiUris.GetFullUri( mBaseUri, ApiEndpoints.ChangeAttribute, repository, attrName); Internal.MakeApiRequest <ChangeAttributeRequest>( endpoint, HttpMethod.Put, request, actionDescription, mPlasticBotUserToken); }