Skip to content

Commit

Permalink
Change formatting standards to new line at end of file (#225)
Browse files Browse the repository at this point in the history
  • Loading branch information
petermeglis authored Feb 4, 2022
1 parent 8afcb6c commit 1f49dab
Show file tree
Hide file tree
Showing 66 changed files with 66 additions and 66 deletions.
2 changes: 1 addition & 1 deletion src/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ tab_width = 4

# New line preferences
end_of_line = lf
insert_final_newline = false
insert_final_newline = true

#### .NET Coding Conventions ####

Expand Down
2 changes: 1 addition & 1 deletion src/Octoshift/AdoApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -521,4 +521,4 @@ public virtual async Task LockRepo(string org, string teamProjectId, string repo
await _client.PostAsync(url, payload);
}
}
}
}
2 changes: 1 addition & 1 deletion src/Octoshift/AdoClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,4 @@ private void CheckForRetryDelay(HttpResponseMessage response)
}
}
}
}
}
2 changes: 1 addition & 1 deletion src/Octoshift/ArchiveMigrationStatus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ public static class ArchiveMigrationStatus
public const string Exported = "exported";
public const string Failed = "failed";
}
}
}
2 changes: 1 addition & 1 deletion src/Octoshift/Extensions/ObjectExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ public static class ObjectExtensions
public static string ToJson(this object obj) =>
obj is null ? null : JsonConvert.SerializeObject(obj);
}
}
}
2 changes: 1 addition & 1 deletion src/Octoshift/Extensions/StringExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ public static class StringExtensions
{
public static StringContent ToStringContent(this string s) => new(s, Encoding.UTF8, "application/json");
}
}
}
2 changes: 1 addition & 1 deletion src/Octoshift/GithubApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -350,4 +350,4 @@ public virtual async Task<string> GetArchiveMigrationUrl(string apiUrl, string o
return response;
}
}
}
}
2 changes: 1 addition & 1 deletion src/Octoshift/GithubClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,4 @@ private string GetNextUrl(KeyValuePair<string, IEnumerable<string>>[] headers)
private string ExtractLinkHeader(KeyValuePair<string, IEnumerable<string>>[] headers) =>
headers.SingleOrDefault(kvp => kvp.Key == "Link").Value?.FirstOrDefault();
}
}
}
2 changes: 1 addition & 1 deletion src/Octoshift/OctoLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,4 @@ public virtual void LogSuccess(string msg)

public virtual void RegisterSecret(string secret) => _secrets.Add(secret);
}
}
}
2 changes: 1 addition & 1 deletion src/Octoshift/OctoshiftCliException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ public OctoshiftCliException(string message, Exception innerException) : base(me
{
}
}
}
}
2 changes: 1 addition & 1 deletion src/OctoshiftCLI.IntegrationTests/AdoToGithub.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,4 +167,4 @@ public void Dispose()
GC.SuppressFinalize(this);
}
}
}
}
2 changes: 1 addition & 1 deletion src/OctoshiftCLI.IntegrationTests/GithubToGithub.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,4 @@ public void Dispose()
GC.SuppressFinalize(this);
}
}
}
}
2 changes: 1 addition & 1 deletion src/OctoshiftCLI.IntegrationTests/TestHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -576,4 +576,4 @@ public async Task AssertBoardsIntegrationConfigured(string adoOrg, string teamPr
boardsConnection.repoIds.Count().Should().Be(1);
}
}
}
}
2 changes: 1 addition & 1 deletion src/OctoshiftCLI.Tests/AdoApiTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -936,4 +936,4 @@ public async Task LockRepo_Should_Send_Correct_Payload()
mockClient.Verify(m => m.PostAsync(endpoint, It.Is<object>(y => y.ToJson() == payload.ToJson())).Result);
}
}
}
}
2 changes: 1 addition & 1 deletion src/OctoshiftCLI.Tests/GithubApiTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -832,4 +832,4 @@ public async Task DeleteRepo_Calls_The_Right_Endpoint()
githubClientMock.Verify(m => m.DeleteAsync(url));
}
}
}
}
2 changes: 1 addition & 1 deletion src/OctoshiftCLI.Tests/GithubClientTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -908,4 +908,4 @@ private Mock<HttpMessageHandler> MockHttpHandler(Func<HttpRequestMessage, bool>
return handlerMock;
}
}
}
}
2 changes: 1 addition & 1 deletion src/OctoshiftCLI.Tests/OctoLoggerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -242,4 +242,4 @@ public void LogVerbose_Should_Write_To_Console_Out_In_Verbose_Mode()

private void CaptureConsoleError(string msg) => _consoleError += msg;
}
}
}
2 changes: 1 addition & 1 deletion src/OctoshiftCLI.Tests/TestHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,4 @@ internal static async Task<bool> RepoExists(string orgName, string repoName)

#endregion
}
}
}
2 changes: 1 addition & 1 deletion src/OctoshiftCLI.Tests/ado2gh/AdoApiFactoryTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ public void Create_Should_Create_Ado_Api_With_Ado_Pat()
httpClient.DefaultRequestHeaders.Authorization.Scheme.Should().Be("Basic");
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ public async Task Invalid_Role()
mockGithub.Verify(x => x.AddTeamToRepo(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>()), Times.Never);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ public async Task Happy_Path()
mockGithub.Verify(x => x.AddAutoLink(githubOrg, githubRepo, adoOrg, adoTeamProject));
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ public async Task Happy_Path()
mockGithub.Verify(x => x.AddEmuGroupToTeam(githubOrg, teamSlug, idpGroupId));
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ public async Task Happy_Path()
mockAdo.Verify(x => x.DisableRepo(adoOrg, adoTeamProject, repoId));
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -437,4 +437,4 @@ private string TrimNonExecutableLines(string script)
return string.Join(Environment.NewLine, lines);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ public async Task Invalid_Actor_Type()
await command.Invoke("foo", "foo", "foo");
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -151,4 +151,4 @@ public async Task Repo_Already_Integrated()
mockAdo.Verify(x => x.AddRepoToBoardsGithubConnection(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<IEnumerable<string>>()), Times.Never);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ public async Task Happy_Path()
mockAdo.Verify(x => x.LockRepo(adoOrg, teamProjectId, repoId, identityDescriptor));
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -145,4 +145,4 @@ public async Task Retries_When_Hosts_Error()
mockGithub.Verify(x => x.StartMigration(migrationSourceId, adoRepoUrl, githubOrgId, githubRepo), Times.Exactly(2));
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ public async Task Invalid_Actor_Type()
await command.Invoke("foo", "foo", "foo");
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ public async Task Happy_Path()
mockAdo.Verify(x => x.ChangePipelineRepo(adoOrg, adoTeamProject, pipelineId, defaultBranch, clean, checkoutSubmodules, githubOrg, githubRepo, serviceConnectionId));
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ public async Task Happy_Path()
mockAdo.Verify(x => x.ShareServiceConnection(adoOrg, adoTeamProject, teamProjectId, serviceConnectionId));
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,4 @@ private void ResetEnvs(string githubPat = null, string adoPat = null)
Environment.SetEnvironmentVariable("ADO_PAT", adoPat);
}
}
}
}
2 changes: 1 addition & 1 deletion src/OctoshiftCLI.Tests/ado2gh/GithubApiFactoryTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ public void Create_Should_Create_Github_Api_With_Github_Pat()
httpClient.DefaultRequestHeaders.Authorization.Scheme.Should().Be("Bearer");
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -185,4 +185,4 @@ private string TrimNonExecutableLines(string script)
return string.Join(Environment.NewLine, lines);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ public async Task Invalid_Actor_Type()
await command.Invoke("foo", "foo", "foo");
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -297,4 +297,4 @@ public async Task Defaults_TargetRepo_To_SourceRepo()
mockGithub.Verify(x => x.GetMigrationState(migrationId));
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ public async Task Invalid_Actor_Type()
await command.Invoke("foo", "foo", "foo");
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@ public void TargetGithubPersonalAccessToken_Throws_If_Github_Source_Pat_Is_Not_S
.Should().Throw<OctoshiftCliException>();
}
}
}
}
2 changes: 1 addition & 1 deletion src/OctoshiftCLI.Tests/gei/GithubApiFactoryTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,4 @@ public void GithubApiFactory_Should_Create_GithubApi_For_Target_Github_Api()
httpClient.DefaultRequestHeaders.Authorization.Scheme.Should().Be("Bearer");
}
}
}
}
2 changes: 1 addition & 1 deletion src/ado2gh/AdoApiFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ public virtual AdoApi Create()
return new AdoApi(adoClient);
}
}
}
}
2 changes: 1 addition & 1 deletion src/ado2gh/Commands/AddTeamToRepoCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ public async Task Invoke(string githubOrg, string githubRepo, string team, strin
_log.LogSuccess("Successfully added team to repo");
}
}
}
}
2 changes: 1 addition & 1 deletion src/ado2gh/Commands/ConfigureAutoLinkCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ public async Task Invoke(string githubOrg, string githubRepo, string adoOrg, str
_log.LogSuccess("Successfully configured autolink references");
}
}
}
}
2 changes: 1 addition & 1 deletion src/ado2gh/Commands/CreateTeamCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ public async Task Invoke(string githubOrg, string teamName, string idpGroup, boo
}
}
}
}
}
2 changes: 1 addition & 1 deletion src/ado2gh/Commands/DisableRepoCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ public async Task Invoke(string adoOrg, string adoTeamProject, string adoRepo, b
_log.LogSuccess("Repo successfully disabled");
}
}
}
}
2 changes: 1 addition & 1 deletion src/ado2gh/Commands/GenerateScriptCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -395,4 +395,4 @@ private string BoardsIntegrationScript(string adoOrg, string adoTeamProject, str
: $"Exec {{ ./ado2gh integrate-boards --ado-org \"{adoOrg}\" --ado-team-project \"{adoTeamProject}\" --github-org \"{githubOrg}\" --github-repo \"{githubRepo}\"{(_log.Verbose ? " --verbose" : string.Empty)} }}";
}
}
}
}
2 changes: 1 addition & 1 deletion src/ado2gh/Commands/GrantMigratorRoleCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@ public async Task Invoke(string githubOrg, string actor, string actorType, bool
}
}
}
}
}
2 changes: 1 addition & 1 deletion src/ado2gh/Commands/IntegrateBoardsCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,4 @@ public async Task Invoke(string adoOrg, string adoTeamProject, string githubOrg,
}
}
}
}
}
2 changes: 1 addition & 1 deletion src/ado2gh/Commands/LockRepoCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ public async Task Invoke(string adoOrg, string adoTeamProject, string adoRepo, b
_log.LogSuccess("Repo successfully locked");
}
}
}
}
2 changes: 1 addition & 1 deletion src/ado2gh/Commands/MigrateRepoCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,4 @@ public async Task Invoke(string adoOrg, string adoTeamProject, string adoRepo, s

private string GetAdoRepoUrl(string org, string project, string repo) => $"https://dev.azure.com/{org}/{project}/_git/{repo}".Replace(" ", "%20");
}
}
}
2 changes: 1 addition & 1 deletion src/ado2gh/Commands/RevokeMigratorRoleCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,4 @@ public async Task Invoke(string githubOrg, string actor, string actorType, bool
}
}
}
}
}
2 changes: 1 addition & 1 deletion src/ado2gh/Commands/RewirePipelineCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,4 @@ public async Task Invoke(string adoOrg, string adoTeamProject, string adoPipelin
_log.LogSuccess("Successfully rewired pipeline");
}
}
}
}
2 changes: 1 addition & 1 deletion src/ado2gh/Commands/ShareServiceConnectionCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ public async Task Invoke(string adoOrg, string adoTeamProject, string serviceCon
_log.LogSuccess("Successfully shared service connection");
}
}
}
}
2 changes: 1 addition & 1 deletion src/ado2gh/EnvironmentVariableProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ private string GetSecret(string secretName)

return secret;
}
}
}
2 changes: 1 addition & 1 deletion src/ado2gh/GithubApiFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ public virtual GithubApi Create()
return new GithubApi(githubClient);
}
}
}
}
2 changes: 1 addition & 1 deletion src/ado2gh/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ private static IServiceCollection AddCommands(this IServiceCollection services)
return services;
}
}
}
}
2 changes: 1 addition & 1 deletion src/gei/AdoApiFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ public virtual AdoApi Create()
return new AdoApi(adoClient);
}
}
}
}
Loading

0 comments on commit 1f49dab

Please sign in to comment.