Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ jobs:
with:
java-version: '11'
distribution: 'adopt'
cache: maven
# cache: maven
- name: Build with Maven
run: mvn -B package --file azd/pom.xml -DskipTests
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

# 6.0.3

- Fixes issues:
- Issue: [Can't get pipeline approvals when using DeploymentsRequestBuilder #84](https://github.com/hkarthik7/azure-devops-java-sdk/issues/84)
- Issue: [Wrong Api version in AzDServiceClient v6.0.2 #85](https://github.com/hkarthik7/azure-devops-java-sdk/issues/85)

# 6.0.2

- Added support for Test suites, results, points, cases and history APIs.
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Build Status](https://dev.azure.com/harishkarthic/azure-devops-java-sdk/_apis/build/status/hkarthik7.azure-devops-java-sdk?branchName=main)](https://dev.azure.com/harishkarthic/azure-devops-java-sdk/_build/latest?definitionId=8&branchName=main)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/hkarthik7/azure-devops-java-sdk/blob/main/LICENSE)
[![Documentation Status](https://readthedocs.org/projects/azure-devops-java-sdk-docs/badge/?version=latest)](https://azure-devops-java-sdk-docs.readthedocs.io/en/latest/?badge=latest)
[![Maven Central](https://img.shields.io/maven-central/v/io.github.hkarthik7/azd.svg)](https://search.maven.org/artifact/io.github.hkarthik7/azd/6.0.2/jar)
[![Maven Central](https://img.shields.io/maven-central/v/io.github.hkarthik7/azd.svg)](https://search.maven.org/artifact/io.github.hkarthik7/azd/6.0.3/jar)

**azd** library provides a convenient way to manage and interact with **Azure DevOps Services** REST API with ease. This SDK offers a set of APIs and utilities
with declarative syntax and provide functionalities to the significant services.
Expand Down Expand Up @@ -33,7 +33,7 @@ To download the library and use it in your project, just add below in your pom.x
<dependency>
<groupId>io.github.hkarthik7</groupId>
<artifactId>azd</artifactId>
<version>6.0.2</version>
<version>6.0.3</version>
</dependency>
```

Expand All @@ -43,7 +43,7 @@ To download the library and use it in your project, just add below in your pom.x
<dependency>
<groupId>io.github.hkarthik7</groupId>
<artifactId>azd</artifactId>
<version>6.0.2</version>
<version>6.0.3</version>
<classifier>javadoc</classifier>
</dependency>
```
Expand All @@ -54,7 +54,7 @@ To download the library and use it in your project, just add below in your pom.x
<dependency>
<groupId>io.github.hkarthik7</groupId>
<artifactId>azd</artifactId>
<version>6.0.2</version>
<version>6.0.3</version>
<classifier>sources</classifier>
</dependency>
```
Expand Down
2 changes: 1 addition & 1 deletion azd/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.github.hkarthik7</groupId>
<artifactId>azd</artifactId>
<version>6.0.2</version>
<version>6.0.3</version>
<packaging>jar</packaging>

<name>azd</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import org.azd.authentication.AccessTokenCredential;
import org.azd.build.types.BuildArtifact;
import org.azd.build.types.BuildArtifacts;
import org.azd.common.ApiVersion;
import org.azd.enums.CustomHeader;
import org.azd.exceptions.AzDException;
import org.azd.http.ClientRequest;
Expand All @@ -24,7 +25,7 @@ public class ArtifactsRequestBuilder extends BaseRequestBuilder {
* @param accessTokenCredential Access token credential object.
*/
public ArtifactsRequestBuilder(String organizationUrl, AccessTokenCredential accessTokenCredential) {
super(organizationUrl, accessTokenCredential, "build", "1db06c96-014e-44e1-ac91-90b2d4b3e984");
super(organizationUrl, accessTokenCredential, "build", "1db06c96-014e-44e1-ac91-90b2d4b3e984", ApiVersion.BUILD_ARTIFACTS);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import org.azd.abstractions.BaseRequestBuilder;
import org.azd.authentication.AccessTokenCredential;
import org.azd.build.types.Attachments;
import org.azd.common.ApiVersion;
import org.azd.enums.CustomHeader;
import org.azd.exceptions.AzDException;

Expand Down Expand Up @@ -47,6 +48,7 @@ public CompletableFuture<InputStream> getAsync(Consumer<AttachmentParameters> at
.serviceEndpoint("type", params.type)
.serviceEndpoint("name", params.attachmentName)
.header(CustomHeader.STREAM_ACCEPT)
.apiVersion(ApiVersion.BUILD_ATTACHMENTS)
.build()
.executeStreamAsync();
}
Expand All @@ -65,6 +67,7 @@ public CompletableFuture<Attachments> listAsync(int buildId, String type) throws
.location("f2192269-89fa-4f94-baf6-8fb128c55159")
.serviceEndpoint("buildId", buildId)
.serviceEndpoint("type", type)
.apiVersion(ApiVersion.BUILD_ATTACHMENTS)
.build()
.executeAsync(Attachments.class);
}
Expand All @@ -91,6 +94,7 @@ public InputStream get(Consumer<AttachmentParameters> attachmentParameters) thro
.serviceEndpoint("type", params.type)
.serviceEndpoint("name", params.attachmentName)
.header(CustomHeader.STREAM_ACCEPT)
.apiVersion(ApiVersion.BUILD_ATTACHMENTS)
.build()
.executeStream();
}
Expand All @@ -109,6 +113,7 @@ public Attachments list(int buildId, String type) throws AzDException {
.location("f2192269-89fa-4f94-baf6-8fb128c55159")
.serviceEndpoint("buildId", buildId)
.serviceEndpoint("type", type)
.apiVersion(ApiVersion.BUILD_ATTACHMENTS)
.build()
.execute(Attachments.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import org.azd.authentication.AccessTokenCredential;
import org.azd.build.types.DefinitionResourceReference;
import org.azd.build.types.DefinitionResourceReferences;
import org.azd.common.ApiVersion;
import org.azd.exceptions.AzDException;

import java.util.List;
Expand All @@ -22,7 +23,7 @@ public class AuthorizedResourcesRequestBuilder extends BaseRequestBuilder {
* @param accessTokenCredential Access token credential object.
*/
public AuthorizedResourcesRequestBuilder(String organizationUrl, AccessTokenCredential accessTokenCredential) {
super(organizationUrl, accessTokenCredential, "build", "398c85bc-81aa-4822-947c-a194a05f0fef");
super(organizationUrl, accessTokenCredential, "build", "398c85bc-81aa-4822-947c-a194a05f0fef", ApiVersion.BUILD_AUTHORIZED_RESOURCES);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import org.azd.abstractions.QueryParameter;
import org.azd.authentication.AccessTokenCredential;
import org.azd.build.types.BuildLogs;
import org.azd.common.ApiVersion;
import org.azd.enums.CustomHeader;
import org.azd.exceptions.AzDException;

Expand All @@ -22,7 +23,7 @@ public class BuildLogsRequestBuilder extends BaseRequestBuilder {
* @param accessTokenCredential Access token credential object.
*/
public BuildLogsRequestBuilder(String organizationUrl, AccessTokenCredential accessTokenCredential) {
super(organizationUrl, accessTokenCredential, "build", "35a80daf-7f30-45fc-86e8-6b813d9c90df");
super(organizationUrl, accessTokenCredential, "build", "35a80daf-7f30-45fc-86e8-6b813d9c90df", ApiVersion.BUILD_LOGS);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import org.azd.abstractions.QueryParameter;
import org.azd.authentication.AccessTokenCredential;
import org.azd.build.types.BuildWorkItems;
import org.azd.common.ApiVersion;
import org.azd.exceptions.AzDException;

import java.util.List;
Expand All @@ -21,7 +22,7 @@ public class BuildWorkItemsRequestBuilder extends BaseRequestBuilder {
* @param accessTokenCredential Access token credential object.
*/
public BuildWorkItemsRequestBuilder(String organizationUrl, AccessTokenCredential accessTokenCredential) {
super(organizationUrl, accessTokenCredential, "build", "5a21f5d2-5642-47e4-a0bd-1356e6731bee");
super(organizationUrl, accessTokenCredential, "build", "5a21f5d2-5642-47e4-a0bd-1356e6731bee", ApiVersion.BUILD_WORK_ITEMS);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class BuildsRequestBuilder extends BaseRequestBuilder {
* @param accessTokenCredential Access token credential object.
*/
public BuildsRequestBuilder(String organizationUrl, AccessTokenCredential accessTokenCredential) {
super(organizationUrl, accessTokenCredential, "build", "0cd358e1-9217-4d94-8269-1c1ee6f93dcf");
super(organizationUrl, accessTokenCredential, "build", "0cd358e1-9217-4d94-8269-1c1ee6f93dcf", ApiVersion.BUILD);

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import org.azd.authentication.AccessTokenCredential;
import org.azd.build.types.BuildController;
import org.azd.build.types.BuildControllers;
import org.azd.common.ApiVersion;
import org.azd.exceptions.AzDException;

import java.util.concurrent.CompletableFuture;
Expand All @@ -19,7 +20,7 @@ public class ControllersRequestBuilder extends BaseRequestBuilder {
* @param accessTokenCredential Access token credential object.
*/
public ControllersRequestBuilder(String organizationUrl, AccessTokenCredential accessTokenCredential) {
super(organizationUrl, accessTokenCredential, "build", "fcac1932-2ee1-437f-9b6f-7f696be858f6");
super(organizationUrl, accessTokenCredential, "build", "fcac1932-2ee1-437f-9b6f-7f696be858f6", ApiVersion.BUILD_CONTROLLERS);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import org.azd.build.types.BuildDefinition;
import org.azd.build.types.BuildDefinitionRevisions;
import org.azd.build.types.BuildDefinitions;
import org.azd.common.ApiVersion;
import org.azd.enums.DefinitionQueryOrder;
import org.azd.exceptions.AzDException;

Expand All @@ -23,7 +24,7 @@ public class DefinitionsRequestBuilder extends BaseRequestBuilder {
* @param accessTokenCredential Access token credential object.
*/
public DefinitionsRequestBuilder(String organizationUrl, AccessTokenCredential accessTokenCredential) {
super(organizationUrl, accessTokenCredential, "build", "dbeaf647-6167-421a-bda9-c9327b25e2e6");
super(organizationUrl, accessTokenCredential, "build", "dbeaf647-6167-421a-bda9-c9327b25e2e6", ApiVersion.BUILD_DEFINITIONS);
}

/**
Expand Down Expand Up @@ -98,6 +99,7 @@ public CompletableFuture<BuildDefinitionRevisions> getRevisionsAsync(int definit
return builder()
.serviceEndpoint("definitionId", definitionId)
.location("7c116775-52e5-453e-8c5d-914d9762d8c4")
.apiVersion(ApiVersion.BUILD_DEFINITION_REVISIONS)
.build()
.executeAsync(BuildDefinitionRevisions.class);
}
Expand Down Expand Up @@ -239,6 +241,7 @@ public BuildDefinitionRevisions getRevisions(int definitionId) throws AzDExcepti
return builder()
.serviceEndpoint("definitionId", definitionId)
.location("7c116775-52e5-453e-8c5d-914d9762d8c4")
.apiVersion(ApiVersion.BUILD_DEFINITION_REVISIONS)
.build()
.execute(BuildDefinitionRevisions.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import org.azd.authentication.AccessTokenCredential;
import org.azd.build.types.Folder;
import org.azd.build.types.Folders;
import org.azd.common.ApiVersion;
import org.azd.enums.FolderQueryOrder;
import org.azd.exceptions.AzDException;
import org.azd.helpers.URLHelper;
Expand All @@ -21,7 +22,7 @@ public class FoldersRequestBuilder extends BaseRequestBuilder {
* @param accessTokenCredential Access token credential object.
*/
public FoldersRequestBuilder(String organizationUrl, AccessTokenCredential accessTokenCredential) {
super(organizationUrl, accessTokenCredential, "build", "a906531b-d2da-4f55-bda7-f3e676cc50d9");
super(organizationUrl, accessTokenCredential, "build", "a906531b-d2da-4f55-bda7-f3e676cc50d9", ApiVersion.BUILD_FOLDER);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import org.azd.abstractions.QueryParameter;
import org.azd.authentication.AccessTokenCredential;
import org.azd.build.types.*;
import org.azd.common.ApiVersion;
import org.azd.enums.SourceProviderResultSet;
import org.azd.exceptions.AzDException;

Expand All @@ -22,7 +23,7 @@ public class SourceProvidersRequestBuilder extends BaseRequestBuilder {
* @param accessTokenCredential Access token credential object.
*/
public SourceProvidersRequestBuilder(String organizationUrl, AccessTokenCredential accessTokenCredential) {
super(organizationUrl, accessTokenCredential, "build");
super(organizationUrl, accessTokenCredential, "build", null, ApiVersion.BUILD_SOURCE_PROVIDERS);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import org.azd.abstractions.BaseRequestBuilder;
import org.azd.authentication.AccessTokenCredential;
import org.azd.common.ApiVersion;
import org.azd.enums.StageUpdateType;
import org.azd.exceptions.AzDException;

Expand All @@ -20,7 +21,7 @@ public class StagesRequestBuilder extends BaseRequestBuilder {
* @param accessTokenCredential Access token credential object.
*/
public StagesRequestBuilder(String organizationUrl, AccessTokenCredential accessTokenCredential) {
super(organizationUrl, accessTokenCredential, "build", "b8aac6c9-744b-46e1-88fc-3550969f9313");
super(organizationUrl, accessTokenCredential, "build", "b8aac6c9-744b-46e1-88fc-3550969f9313", ApiVersion.BUILD_STAGE);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import org.azd.abstractions.BaseRequestBuilder;
import org.azd.authentication.AccessTokenCredential;
import org.azd.build.types.BuildTags;
import org.azd.common.ApiVersion;
import org.azd.exceptions.AzDException;

import java.util.List;
Expand All @@ -20,7 +21,7 @@ public class BuildDefinitionTagsRequestBuilder extends BaseRequestBuilder {
* @param accessTokenCredential Access token credential object.
*/
public BuildDefinitionTagsRequestBuilder(String organizationUrl, AccessTokenCredential accessTokenCredential) {
super(organizationUrl, accessTokenCredential, "build", "cb894432-134a-4d31-a839-83beceaace4b");
super(organizationUrl, accessTokenCredential, "build", "cb894432-134a-4d31-a839-83beceaace4b", ApiVersion.BUILD_TAGS);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import org.azd.abstractions.BaseRequestBuilder;
import org.azd.authentication.AccessTokenCredential;
import org.azd.build.types.BuildTags;
import org.azd.common.ApiVersion;
import org.azd.exceptions.AzDException;

import java.util.List;
Expand All @@ -20,7 +21,7 @@ public class BuildTagsRequestBuilder extends BaseRequestBuilder {
* @param accessTokenCredential Access token credential object.
*/
public BuildTagsRequestBuilder(String organizationUrl, AccessTokenCredential accessTokenCredential) {
super(organizationUrl, accessTokenCredential, "build", "6e6114b2-8161-44c8-8f6c-c5505782427f");
super(organizationUrl, accessTokenCredential, "build", "6e6114b2-8161-44c8-8f6c-c5505782427f", ApiVersion.BUILD_TAGS);
}

/**
Expand Down
3 changes: 2 additions & 1 deletion azd/src/main/java/org/azd/build/tags/TagsRequestBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import org.azd.abstractions.BaseRequestBuilder;
import org.azd.authentication.AccessTokenCredential;
import org.azd.build.types.BuildTags;
import org.azd.common.ApiVersion;
import org.azd.exceptions.AzDException;

import java.util.concurrent.CompletableFuture;
Expand All @@ -18,7 +19,7 @@ public class TagsRequestBuilder extends BaseRequestBuilder {
* @param accessTokenCredential Access token credential object.
*/
public TagsRequestBuilder(String organizationUrl, AccessTokenCredential accessTokenCredential) {
super(organizationUrl, accessTokenCredential, "build", "d84ac5c6-edc7-43d5-adc9-1b34be5dea09");
super(organizationUrl, accessTokenCredential, "build", "d84ac5c6-edc7-43d5-adc9-1b34be5dea09", ApiVersion.BUILD_TAGS);

}

Expand Down
3 changes: 2 additions & 1 deletion azd/src/main/java/org/azd/build/yaml/YamlRequestBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import org.azd.abstractions.QueryParameter;
import org.azd.authentication.AccessTokenCredential;
import org.azd.build.types.YamlBuild;
import org.azd.common.ApiVersion;
import org.azd.exceptions.AzDException;

import java.util.concurrent.CompletableFuture;
Expand All @@ -20,7 +21,7 @@ public class YamlRequestBuilder extends BaseRequestBuilder {
* @param accessTokenCredential Access token credential object.
*/
public YamlRequestBuilder(String organizationUrl, AccessTokenCredential accessTokenCredential) {
super(organizationUrl, accessTokenCredential, "build", "7c3df3a1-7e51-4150-8cf7-540347f8697f");
super(organizationUrl, accessTokenCredential, "build", "7c3df3a1-7e51-4150-8cf7-540347f8697f", ApiVersion.BUILD_YAML);
}

/**
Expand Down
Loading