Skip to content

Conversation

MartinPayne
Copy link

Use REST API version "3.0-preview.1" when posting commit or PR status
back to TFS, because version "4.1-preview" is not supported by TFS 2017
or 2018.

Resolves JENKINS-51579.

Use REST API version "3.0-preview.1" when posting commit or PR status
back to TFS, because version "4.1-preview" is not supported by TFS 2017
or 2018.
public TeamGitStatus addPullRequestStatus(final PullRequestMergeCommitCreatedEventArgs args, final TeamGitStatus status) throws IOException {

final QueryString qs = new QueryString(API_VERSION, "4.1-preview");
final QueryString qs = new QueryString(API_VERSION, "3.0-preview.1");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use a released version? The APIs are on 5.0 now. It seems like 3.0 should not need the preview tag.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the documentation, the commit status API request is no longer in preview but the pull request status still is. However, for compatibility with TFS 2017 and 2018, "3.0-preview.1" looks to be the only supported version. Any other version gives a "404 - Not Found" HTTP response.

Copy link
Contributor

@jpricket jpricket left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants