Skip to content

Commit

Permalink
fix: Show error message if Azure DevOps auth token is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
HofmeisterAn committed Oct 23, 2023
1 parent 488c660 commit 38e603e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Accelerate/Repositories/AzureDevOps.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ public async Task<bool> PushAsync(Campaign campaign, AzureDevOps repository, Can

public async Task<bool> CreatePullRequestsAsync(Campaign campaign, AzureDevOps repository, string title, string description, CancellationToken ct = default)
{
if (string.IsNullOrWhiteSpace(_azureDevOpsSettings.Value.AuthToken))
{
_logger.LogError("Repository=\"{Repository}\" Msg=\"{Msg}\"", repository.Name, "Azure DevOps auth token is missing.");
return false;
}

var workDir = Path.Combine(campaign.WorkingDirectoryPath, repository.WorkingDirectoryPath);
var args = new[] { "symbolic-ref", "refs/remotes/origin/HEAD" };

Expand Down

0 comments on commit 38e603e

Please sign in to comment.