-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get YouTrack build number #75
Comments
I've added this myself as an extension to Connection for now: public class BuildVersionResult
{
[JsonProperty( "build" )]
public string Build;
}
public static async Task<BuildVersionResult> BuildVersion( this Connection connection )
{
var httpClient = await connection.GetAuthenticatedHttpClient();
var client = httpClient;
var response = await client.GetAsync($"api/config?fields=build" );
response.EnsureSuccessStatusCode();
var str = await response.Content.ReadAsStringAsync();
var f = JsonConvert.DeserializeObject<BuildVersionResult>( str );
return f;
} |
@MarkAudax do you happen to have a link to the documentation in the REST API for this one? |
@maartenba Sorry no, but I got the idea from here: https://github.com/JetBrains/youtrack-rest-python-library/blob/1140fe3697d3bbd233f967a1ea0eac8544040e22/youtrack/connection.py#L1223 |
Let me see if I can add it. |
That was quick, thanks very much! |
Release will be done later today. Thanks @MarkAudax for suggesting! (and PR's are always welcome :)) |
Perfect - I have forked and I'll get set up for PRs :) |
No description provided.
The text was updated successfully, but these errors were encountered: