You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.
Pull request statuses can be posted on the overall pull request or on the specific pull request iteration.
It is said that you can pass the iterationId, not that you should
Note that you can specify iterationId in the request body to post the status on the iteration.
But if I try:
GitPullRequestStatusstatus = newGitPullRequestStatus();
GitStatusContextcontext = newGitStatusContext();
context.setGenre("Foo");
context.setName("Bar");
status.setContext(context);
status.setState(statusState);
status.setDescription(statusDescription);
status.setTargetUrl(targetUrl);
// Don't set iterationId on the statusgitHttpClient.createPullRequestStatus(status, gitRepo.getId(), pullRequest.getPullRequestId());
It fails with:
com.microsoft.alm.client.model.VssServiceException: The value 0 is outside of the allowed range.
Parameter name: iterationId
Actual value was 0.
at com.microsoft.alm.visualstudio.services.webapi.WrappedException.Unwrap(WrappedException.java:193)
at com.microsoft.alm.client.VssHttpClientBase.handleResponse(VssHttpClientBase.java:235)
at com.microsoft.alm.client.VssHttpClientBase.sendRequest(VssHttpClientBase.java:213)
at com.microsoft.alm.client.VssHttpClientBase.sendRequest(VssHttpClientBase.java:218)
at com.microsoft.alm.teamfoundation.sourcecontrol.webapi.GitHttpClientBase.createPullRequestStatus(GitHttpClientBase.java:11472)
According to the documentation, it should be possible to create a PR status without specifying an iterationId: https://www.visualstudio.com/en-us/docs/integrate/api/git/pull-requests/pullrequeststatuses
It is said that you can pass the iterationId, not that you should
But if I try:
It fails with:
I think the problem com from the fact that GitPullRequestStatus#iterationId should be an Integer and accept null values.
The text was updated successfully, but these errors were encountered: