Skip to content

Commit

Permalink
Set api-version in query
Browse files Browse the repository at this point in the history
  • Loading branch information
mburumaxwell committed Sep 21, 2023
1 parent fc71a45 commit da46850
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
3 changes: 0 additions & 3 deletions server/Tingle.Dependabot/Extensions/ILoggerExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ namespace Microsoft.Extensions.Logging;

internal static partial class ILoggerExtensions
{
//[LoggerMessage(100, LogLevel.Warning, "Retrying periodic task execution {CurrentTry} of {MaxRetries}")]
//public static partial void RetryingExecutionOfPeriodicTask(this ILogger logger, Exception exception, int currentTry, int maxRetries);

#region Webhooks (2xx)

[LoggerMessage(200, LogLevel.Debug, "Received {EventType} notification {NotificationId} on subscription {SubscriptionId}")]
Expand Down
9 changes: 1 addition & 8 deletions server/Tingle.Dependabot/Workflow/AzureDevOpsProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,21 +131,14 @@ public async Task<List<string>> CreateOrUpdateSubscriptionsAsync(Project project

public async Task<AzdoProject> GetProjectAsync(Project project, CancellationToken cancellationToken)
{
//// get a connection to Azure DevOps
//var url = (AzureDevOpsProjectUrl)project.Url!;
//var connection = CreateVssConnection(url, project.Token!);

//// get the project
//var client = await connection.GetClientAsync<ProjectHttpClient>(cancellationToken);
//return await client.GetProject(id: url.ProjectIdOrName);

var url = (AzureDevOpsProjectUrl)project.Url!;
var uri = new UriBuilder
{
Scheme = url.Scheme,
Host = url.Hostname,
Port = url.Port ?? -1,
Path = $"{url.OrganizationName}/_apis/projects/{url.ProjectIdOrName}",
Query = "?api-version=7.0",
}.Uri;
var request = new HttpRequestMessage(HttpMethod.Get, uri);
return (await SendAsync<AzdoProject>(project.Token!, request, cancellationToken))!;
Expand Down

0 comments on commit da46850

Please sign in to comment.