|
1 | 1 | # GitHub Developer Experience(DevEx) Accelerator |
2 | 2 |
|
3 | | -## Overview |
| 3 | +## [Overview](#overview) |
4 | 4 |
|
5 | | -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
| 5 | +The GitHub Developer Experience (DevEx) Accelerator is an application designed to enhance the developer experience on GitHub, by providing a set of self-service mechanisms and features to streamline the onboarding and compliance of your repositories within your GitHub organizations.<br/> |
| 6 | +This application is built using .NET Core. It supports multiple data stores, including SQL Server and CosmosDB, and integrates with Azure Key Vault for secure storage of sensitive information. |
6 | 7 |
|
7 | | -## Getting started |
| 8 | +## [Getting started](#getting-started) |
8 | 9 |
|
9 | 10 | ### Prerequisites |
10 | | -- [.NET Core 9](https://dotnet.microsoft.com/en-us/download/dotnet/9.0) |
| 11 | +- [.NET Core 9](https://dotnet.microsoft.com/en-us/download/dotnet/9.0) |
| 12 | +- A Sql Server instance or CosmosDB account |
| 13 | +- Azure Key Vault to store the private PEM key certificate |
| 14 | +- Have a properly setup GitHub App with the necessary permissions. See [GitHub setup](#github-setup) for more details. |
| 15 | + |
| 16 | +## AppSettings.json Configuration |
| 17 | + |
| 18 | +| Key | Type | Description | |
| 19 | +|------------------------------------------|--------|-----------------------------------------------------------------------------| |
| 20 | +| `Logging:LogLevel:Default` | String | Specifies the default log level. | |
| 21 | +| `Logging:LogLevel:Microsoft.AspNetCore` | String | Log level for Microsoft.AspNetCore namespace. | |
| 22 | +| `AllowedHosts` | String | Comma-separated list of allowed hosts. | |
| 23 | +| `AllowedOrigins` | Array | List of allowed origins for CORS. Example: https://localhost:8000 | |
| 24 | +| `AppLocale` | String | Application locale, optional, defaults to "en" (English). | |
| 25 | +| `GitHub:AppId` | String | GitHub App ID. | |
| 26 | +| `GitHub:WebhookSecret` | String | Secret for GitHub webhooks. | |
| 27 | +| `GitHub:RepoOnboarding` | String | Repository for onboarding. | |
| 28 | +| `GitHub:RepoInventory` | String | Repository for inventory. | |
| 29 | +| `GitHub:RepoPolicy` | String | Repository for policy. | |
| 30 | +| `GitHub:IssueAutoApprove` | String | Automatically approve issues, "true" or "false". | |
| 31 | +| `GitHub:UseInventoryWithPullRequest` | String | Use inventory with pull requests, "true" or "false". | |
| 32 | +| `GitHub:RepoRulesetsCustomPropertyName` | String | Custom property name for repository rulesets. | |
| 33 | +| `Azure:KeyVaultName` | String | Name of the Azure Key Vault. | |
| 34 | +| `Azure:KeyName` | String | Name of the key in Azure Key Vault. | |
| 35 | +| `DataStore:Type` | String | Type of data store (FileSystem, CosmosDb, SqlServer). | |
| 36 | +| `DataStore:FileSystem:FilePath` | String | File path for file system data store. | |
| 37 | +| `DataStore:CosmosDb:Database` | String | Database name for Cosmos DB. | |
| 38 | +| `DataStore:CosmosDb:ConnectionString` | String | Connection string for Cosmos DB. | |
| 39 | +| `DataStore:CosmosDb:GitHubWebhooksContainer` | String | Container for GitHub webhooks in Cosmos DB. | |
| 40 | +| `DataStore:SqlServer:ConnectionString` | String | Connection string for SQL Server. | |
| 41 | + |
| 42 | + |
| 43 | +### Example |
| 44 | + |
| 45 | +```json |
| 46 | +{ |
| 47 | + "Logging": { |
| 48 | + "LogLevel": { |
| 49 | + "Default": "Information", |
| 50 | + "Microsoft.AspNetCore": "Warning" |
| 51 | + } |
| 52 | + }, |
| 53 | + // Filter for hostnames app can bind to |
| 54 | + "AllowedHosts": "*", |
| 55 | + "AllowedOrigins": [], |
| 56 | + // optional, defaults to en (english) |
| 57 | + "AppLocale": "", |
| 58 | + "GitHub": { |
| 59 | + "AppId": "", |
| 60 | + "WebhookSecret": "", |
| 61 | + "RepoOnboarding": "", |
| 62 | + "RepoInventory": "", |
| 63 | + "RepoPolicy": "", |
| 64 | + "IssueAutoApprove": "true", |
| 65 | + "UseInventoryWithPullRequest": "true", |
| 66 | + "RepoRulesetsCustomPropertyName": "" |
| 67 | + }, |
| 68 | + "Azure": { |
| 69 | + "KeyVaultName": "", |
| 70 | + "KeyName": "" |
| 71 | + }, |
| 72 | + "DataStore": { |
| 73 | + // FileSystem, CosmosDb, SqlServer |
| 74 | + "Type": "", |
| 75 | + "FileSystem": { |
| 76 | + "FilePath": "" |
| 77 | + }, |
| 78 | + "CosmosDb": { |
| 79 | + "Database": "", |
| 80 | + "ConnectionString": "", |
| 81 | + // Each container requires a specific partition key. Ensure these are set correctly in your CosmosDB instance. |
| 82 | + "GitHubWebhooksContainer": "" |
| 83 | + }, |
| 84 | + "SqlServer": { |
| 85 | + "ConnectionString": "" |
| 86 | + } |
| 87 | + } |
| 88 | +} |
| 89 | +``` |
| 90 | + |
| 91 | +## [GitHub setup](#github-setup) |
| 92 | + |
| 93 | +Before you can use the GitHub DevEx Accelerator, you need to set up a GitHub App and configure it with the necessary permissions. Please follow the guide [here](./docs/github-app-setup.md) to do so. |
0 commit comments