{"id":15412300,"url":"https://github.com/balanikas/github-repository-analysis","last_synced_at":"2026-03-14T08:42:45.059Z","repository":{"id":63526472,"uuid":"563873568","full_name":"balanikas/github-repository-analysis","owner":"balanikas","description":"Analysis of public github repositories","archived":false,"fork":false,"pushed_at":"2023-03-20T18:09:18.000Z","size":631,"stargazers_count":7,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-19T16:13:21.906Z","etag":null,"topics":["dotnet","github","repository"],"latest_commit_sha":null,"homepage":"https://githubrepositoryanalysis.com","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/balanikas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":".github/SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-09T14:16:59.000Z","updated_at":"2024-01-28T11:07:32.000Z","dependencies_parsed_at":"2024-10-20T14:36:47.379Z","dependency_job_id":null,"html_url":"https://github.com/balanikas/github-repository-analysis","commit_stats":{"total_commits":110,"total_committers":1,"mean_commits":110.0,"dds":0.0,"last_synced_commit":"0f949a2c886792919762659ad2f1ba793e884682"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/balanikas/github-repository-analysis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balanikas%2Fgithub-repository-analysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balanikas%2Fgithub-repository-analysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balanikas%2Fgithub-repository-analysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balanikas%2Fgithub-repository-analysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/balanikas","download_url":"https://codeload.github.com/balanikas/github-repository-analysis/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balanikas%2Fgithub-repository-analysis/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265529090,"owners_count":23782820,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dotnet","github","repository"],"created_at":"2024-10-01T16:52:09.843Z","updated_at":"2026-03-14T08:42:45.003Z","avatar_url":"https://github.com/balanikas.png","language":"C#","readme":"# Github Repository Analysis\nService that provides analysis and guidance for public github repositories. \n- Do you already have a public github project you want to check?\n- Do you plan to make a project public?\n\nThen this is for you.\n\n#### Status\n[![build and test](https://github.com/balanikas/github-repository-analysis/actions/workflows/deploy-to-acr.yaml/badge.svg)](https://github.com/balanikas/github-repository-analysis/actions/workflows/deploy-to-acr.yaml)\n[![CodeQL](https://github.com/balanikas/github-repository-analysis/actions/workflows/codeql.yml/badge.svg)](https://github.com/balanikas/github-repository-analysis/actions/workflows/codeql.yml)\n![Website](https://img.shields.io/website?down_message=offline\u0026label=service\u0026up_message=online\u0026url=https%3A%2F%2Fgithubrepositoryanalysis.com%2F)\n\n#### Quality\n[![SonarCloud](https://sonarcloud.io/images/project_badges/sonarcloud-white.svg)](https://sonarcloud.io/summary/new_code?id=balanikas_github-repository-analysis)\n\n[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=balanikas_github-repository-analysis\u0026metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=balanikas_github-repository-analysis)\n[![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=balanikas_github-repository-analysis\u0026metric=duplicated_lines_density)](https://sonarcloud.io/summary/new_code?id=balanikas_github-repository-analysis)\n[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=balanikas_github-repository-analysis\u0026metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=balanikas_github-repository-analysis)\n[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=balanikas_github-repository-analysis\u0026metric=bugs)](https://sonarcloud.io/summary/new_code?id=balanikas_github-repository-analysis)\n[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=balanikas_github-repository-analysis\u0026metric=security_rating)](https://sonarcloud.io/summary/new_code?id=balanikas_github-repository-analysis)\n[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=balanikas_github-repository-analysis\u0026metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=balanikas_github-repository-analysis)\n[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=balanikas_github-repository-analysis\u0026metric=code_smells)](https://sonarcloud.io/summary/new_code?id=balanikas_github-repository-analysis)\n[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=balanikas_github-repository-analysis\u0026metric=ncloc)](https://sonarcloud.io/summary/new_code?id=balanikas_github-repository-analysis)\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=balanikas_github-repository-analysis\u0026metric=coverage)](https://sonarcloud.io/summary/new_code?id=balanikas_github-repository-analysis)\n[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=balanikas_github-repository-analysis\u0026metric=sqale_index)](https://sonarcloud.io/summary/new_code?id=balanikas_github-repository-analysis)\n\n## How it works\nGiven a repository, the system will fetch all publicly available data for that repository,\nevaluate it based on a set of rules, and present the results together with additional guidance.\nThe guidance is generated dynamically using the Open AI GPT-3 model.\n\nhttps://user-images.githubusercontent.com/2317329/207807236-684bf53d-96c3-4c2c-ac73-c6d5389ab1fa.mov\n\n## How to add a new rule\nLets add a rule that detects whether a readme file exists at the repository root.\n\n#### Create the rule class\nCreate a rule class in an appropriate category. In this case we choose category `Documentation`\n```csharp\npublic class ReadmeRuleApplicator : IRuleApplicator\n{\n    // annotate questions to be answered by openai gpt-3 model.\n    [RuleGuidance] \n    private const string HowToWrite = \"Write a short example of a well designed readme file\";\n    [RuleGuidance] \n    private const string MultipleFiles = \"How many readme files can a repository have and why should i have more than one?\";\n    [RuleGuidance(200, Tone.Motivational, Complexity.Simple)]\n    private const string WhatIs = \"What is a github readme file and why is it important?\";\n    \n    public string RuleName =\u003e \"readme\";\n    public RuleCategory Category =\u003e RuleCategory.Documentation;\n    public Language Language =\u003e Language.None; // set to None since the rule is language agnostic\n\n    public Task\u003cRule\u003e ApplyAsync(AnalysisContext context) =\u003e\n        throw new NotImplementedException();\n}\n```\n#### Implement the rule\n```csharp\npublic async Task\u003cRule\u003e ApplyAsync(AnalysisContext context)\n{\n    // apply the rule using the context object\n    var node = context.GitTree.FirstFileOrDefault(x =\u003e x.PathEquals(\"readme.md\"));\n    var (diagnosis, note) = GetDiagnosis(node);\n    (Diagnosis, string) GetDiagnosis(GitTree.Node? n) =\u003e\n        n is not null\n            ? (Diagnosis.Info, \"found\")\n            : (Diagnosis.Error, \"missing\");\n    \n    // compose the results\n    return Rule.Create(this, diagnostics, new Explanation\n    {\n        GeneralGuidance = await _gpt3Client.GetCompletions(MultipleFiles, HowToWrite),\n        Text = await _gpt3Client.GetCompletion(WhatIs),\n        AboutLink = new Link(\"about readmes\",\n            \"https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-readmes\"),\n        GuidanceLink = diagnostics.Diagnosis == Diagnosis.Error ? context.GetCommunityLink() : null\n    });\n}\n```\n\n#### See the rule in the UI\n![custom rule](customrule.png)\n\n\nFor more info and to get started, see [the contributing document](CONTRIBUTING.md)\n\n## About this service\nThis service is primarily targeted to small or medium sized repos,\nthat are owned by a single person or a small group of contributors.\nIt can be very useful to those getting started with open source projects, but also\nfor more experienced developers who want to do a quality check of their own repos.\nA repository can be configured in many ways, and just because this service produces some warnings \nand recommendations based on assumptions and standard practices, doesn't mean that the repository\nis in a definitive bad shape. \n\nThe analysis is presented as a set of detections, where each detection is either\n- `Okay` - looks good and no action needed \n- `Can be improved` - an action can be taken for improvement\n- `Warning` - strongly recommended to address this\n\nThis service currently has extra checks for csharp repositories, but any repository should work for general rules.\nFor feedback, please create a new issue at https://github.com/balanikas/github-repository-analysis/issues\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbalanikas%2Fgithub-repository-analysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbalanikas%2Fgithub-repository-analysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbalanikas%2Fgithub-repository-analysis/lists"}