Skip to content

Restore Support for TFS 2017/2018 in Build Status - #199

Open
MartinPayne wants to merge 1 commit into
jenkinsci:masterfrom
MartinPayne:upstream/pr/build-status-api-version
Open

MartinPayne wants to merge 1 commit into
jenkinsci:masterfrom
MartinPayne:upstream/pr/build-status-api-version

Conversation

@MartinPayne

Copy link
Copy Markdown

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
Copy Markdown

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
Copy Markdown
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.

@jpricket jpricket left a comment

Copy link
Copy Markdown

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