-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
55 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
namespace WebOptimizationProject.Helpers | ||
{ | ||
public static class RelativeGitPathHelper | ||
{ | ||
public static string GetRelativeGitPath(string clonedRepoPath, string fullFilePath, string branchName) | ||
{ | ||
clonedRepoPath = clonedRepoPath.Replace('\\', '/'); | ||
clonedRepoPath = clonedRepoPath.TrimEnd('/'); | ||
|
||
fullFilePath = fullFilePath.Replace('\\', '/'); | ||
|
||
if (!fullFilePath.ToUpperInvariant().StartsWith(clonedRepoPath.ToUpperInvariant())) | ||
{ | ||
return null; | ||
} | ||
|
||
string relativePath = fullFilePath.Substring(clonedRepoPath.Length); | ||
string retval = $"../blob/{branchName}{relativePath}"; | ||
return retval; | ||
} | ||
} | ||
} | ||
namespace WebOptimizationProject.Helpers | ||
{ | ||
public static class RelativeGitPathHelper | ||
{ | ||
public static string GetRelativeGitPath(string clonedRepoPath, string fullFilePath, string branchName) | ||
{ | ||
clonedRepoPath = clonedRepoPath.Replace('\\', '/'); | ||
clonedRepoPath = clonedRepoPath.TrimEnd('/'); | ||
|
||
fullFilePath = fullFilePath.Replace('\\', '/'); | ||
|
||
if (!fullFilePath.StartsWith(clonedRepoPath, System.StringComparison.OrdinalIgnoreCase)) | ||
{ | ||
return null; | ||
} | ||
|
||
string relativePath = fullFilePath.Substring(clonedRepoPath.Length); | ||
string retval = $"../blob/{branchName}{relativePath}"; | ||
return retval; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard1.5</TargetFramework> | ||
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute> | ||
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute> | ||
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute> | ||
<Version>1.0.0.0</Version> | ||
<Title>WebOptimizationProject</Title> | ||
<Authors>Devedse</Authors> | ||
<Description>The Library around DeveImageOptimizer to optimize GitHub repositories</Description> | ||
<PackageProjectUrl>https://github.com/devedse/WebOptimizationProject</PackageProjectUrl> | ||
<PackageTags>image;optimization;github</PackageTags> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="DeveImageOptimizer" Version="1.0.163" /> | ||
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" /> | ||
<PackageReference Include="Octokit" Version="0.28.0" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<None Update="CommitInPullRequestMarkdownTemplate.txt"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</None> | ||
<None Update="CommitMarkdownTemplate.txt"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</None> | ||
<None Update="PullRequestMarkdownTemplate.txt"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</None> | ||
</ItemGroup> | ||
|
||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard1.5</TargetFramework> | ||
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute> | ||
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute> | ||
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute> | ||
<Version>1.0.0.0</Version> | ||
<Title>WebOptimizationProject</Title> | ||
<Authors>Devedse</Authors> | ||
<Description>The Library around DeveImageOptimizer to optimize GitHub repositories</Description> | ||
<PackageProjectUrl>https://github.com/devedse/WebOptimizationProject</PackageProjectUrl> | ||
<PackageTags>image;optimization;github</PackageTags> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="DeveImageOptimizer" Version="1.0.163" /> | ||
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" /> | ||
<PackageReference Include="Octokit" Version="0.28.0" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<None Update="CommitInPullRequestMarkdownTemplate.txt"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</None> | ||
<None Update="CommitMarkdownTemplate.txt"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</None> | ||
<None Update="PullRequestMarkdownTemplate.txt"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</None> | ||
</ItemGroup> | ||
|
||
</Project> |