diff --git a/github-app b/github-app deleted file mode 160000 index 18c2740..0000000 --- a/github-app +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 18c274042db49639397dc1b8e2a619c6cc919467 diff --git a/github-app/.dockerignore b/github-app/.dockerignore new file mode 100644 index 0000000..3729ff0 --- /dev/null +++ b/github-app/.dockerignore @@ -0,0 +1,25 @@ +**/.classpath +**/.dockerignore +**/.env +**/.git +**/.gitignore +**/.project +**/.settings +**/.toolstarget +**/.vs +**/.vscode +**/*.*proj.user +**/*.dbmdl +**/*.jfm +**/azds.yaml +**/bin +**/charts +**/docker-compose* +**/Dockerfile* +**/node_modules +**/npm-debug.log +**/obj +**/secrets.dev.yaml +**/values.dev.yaml +LICENSE +README.md \ No newline at end of file diff --git a/github-app/Dockerfile b/github-app/Dockerfile new file mode 100644 index 0000000..7033707 --- /dev/null +++ b/github-app/Dockerfile @@ -0,0 +1,21 @@ +#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. + +FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base +WORKDIR /app +EXPOSE 80 + +FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build +WORKDIR /src +COPY ["ScalableRazor.csproj", "."] +RUN dotnet restore "./ScalableRazor.csproj" +COPY . . +WORKDIR "/src/." +RUN dotnet build "ScalableRazor.csproj" -c Release -o /app/build + +FROM build AS publish +RUN dotnet publish "ScalableRazor.csproj" -c Release -o /app/publish /p:UseAppHost=false + +FROM base AS final +WORKDIR /app +COPY --from=publish /app/publish . +ENTRYPOINT ["dotnet", "ScalableRazor.dll"] \ No newline at end of file diff --git a/github-app/GitHubRepo.cs b/github-app/GitHubRepo.cs new file mode 100644 index 0000000..ba5a1cb --- /dev/null +++ b/github-app/GitHubRepo.cs @@ -0,0 +1,16 @@ +using System.Text.Json.Serialization; + +namespace ScalableRazor +{ + public class GitHubRepo + { + [JsonPropertyName("name")] + public string Name { get; set; } + + [JsonPropertyName("description")] + public string Description { get; set; } + + [JsonPropertyName("html_url")] + public string HtmlUrl { get; set; } + } +} diff --git a/github-app/Pages/Error.cshtml b/github-app/Pages/Error.cshtml new file mode 100644 index 0000000..6f92b95 --- /dev/null +++ b/github-app/Pages/Error.cshtml @@ -0,0 +1,26 @@ +@page +@model ErrorModel +@{ + ViewData["Title"] = "Error"; +} + +
+ Request ID: @Model.RequestId
+
+ Swapping to the Development environment displays detailed information about the error that occurred. +
++ The Development environment shouldn't be enabled for deployed applications. + It can result in displaying sensitive information from exceptions to end users. + For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development + and restarting the app. +
diff --git a/github-app/Pages/Error.cshtml.cs b/github-app/Pages/Error.cshtml.cs new file mode 100644 index 0000000..a969c40 --- /dev/null +++ b/github-app/Pages/Error.cshtml.cs @@ -0,0 +1,27 @@ +using System.Diagnostics; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.RazorPages; + +namespace ScalableRazor.Pages +{ + [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] + [IgnoreAntiforgeryToken] + public class ErrorModel : PageModel + { + public string? RequestId { get; set; } + + public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); + + private readonly ILoggerEnter the name of a GitHub organization such as "Microsoft" or "Azure" or "acorn-io" to browse its repositories.
+ + + +Name | +Description | +Link | +
@item.Name | +@Html.Raw(item.Description) | +Browse | +
Use this page to detail your site's privacy policy.
diff --git a/github-app/Pages/Privacy.cshtml.cs b/github-app/Pages/Privacy.cshtml.cs new file mode 100644 index 0000000..80e61f7 --- /dev/null +++ b/github-app/Pages/Privacy.cshtml.cs @@ -0,0 +1,19 @@ +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.RazorPages; + +namespace ScalableRazor.Pages +{ + public class PrivacyModel : PageModel + { + private readonly ILogger