{"id":19848524,"url":"https://github.com/tarek360/koshry","last_synced_at":"2026-02-25T20:01:16.044Z","repository":{"id":32981988,"uuid":"147859044","full_name":"tarek360/koshry","owner":"tarek360","description":"Run on CI, Apply Rules on the Build and Get the Result back to the Pull Request.","archived":false,"fork":false,"pushed_at":"2019-08-09T10:39:39.000Z","size":177,"stargazers_count":58,"open_issues_count":0,"forks_count":2,"subscribers_count":7,"default_branch":"develop","last_synced_at":"2025-05-01T22:35:57.636Z","etag":null,"topics":["automation","ci-pipeline","ci-tools","circleci","codereview","continuous-integration","kotlin","pull-request","teamcity","test-coverage","travis-ci"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tarek360.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-07T18:12:57.000Z","updated_at":"2023-02-17T18:09:09.000Z","dependencies_parsed_at":"2022-09-04T00:52:16.488Z","dependency_job_id":null,"html_url":"https://github.com/tarek360/koshry","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/tarek360/koshry","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarek360%2Fkoshry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarek360%2Fkoshry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarek360%2Fkoshry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarek360%2Fkoshry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tarek360","download_url":"https://codeload.github.com/tarek360/koshry/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarek360%2Fkoshry/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29837431,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T19:08:47.527Z","status":"ssl_error","status_checked_at":"2026-02-25T18:59:04.705Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["automation","ci-pipeline","ci-tools","circleci","codereview","continuous-integration","kotlin","pull-request","teamcity","test-coverage","travis-ci"],"created_at":"2024-11-12T13:17:31.706Z","updated_at":"2026-02-25T20:01:16.029Z","avatar_url":"https://github.com/tarek360.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Koshry\n\n\n## What's Koshry?\n**Koshry**:\n- is a dev tool, runs during your **CI Build** or on your **Local Machine Build**.\n- gives your team the ability to monitor **pull requests** and take automatic **actions** depend on your rules result.\n- create a report of the result of applying your rules on the pull request and post it back as a comment on the pull request.\n- is written in **Kotlin** and runs on JVM.\n- has some of the [ready rules](https://github.com/tarek360/koshry/wiki) for common use cases.\n- is **customizable**, you can [write your own **Custom Rule**](https://medium.com/@Tarek360/your-first-koshry-rule-c6648ac34ca2), everything is a **Rule** in Koshry.\n- works on any project whatever the programming language you use in your project\n\n\n## Run Koshry in 3 steps:\n\n**1-** Add Koshry to your build process:\n\nGradle:\n```gradle\nimplementation \"io.github.tarek360.koshry:koshry:0.0.4\"\n```\n\n**2-** Invoke Koshry with one rule at least.\n\n```kotlin\nval koshryConfig = koshry {\n    rules {\n        rule = rule1\n        rule = rule2\n    }\n}\n\nKoshry.run(koshryConfig)\n```\n\n**3-** Add one environment variable to your CI.\n\nAdd your git host (Github for example) token as an environment variable to allow Koshry post a comment and update the commit status.\nUse `KOSHRY_GIT_HOST_TOKEN` as a key of the environment variable.\n\n\n## Koshry Rules:\nEach Koshry **Rule** does some work then returns a **Report** (or not) as a result of that work.\n\nWhile you can [create your own custom rule](https://medium.com/@Tarek360/your-first-koshry-rule-c6648ac34ca2), Koshry has some of the ready rules, you can make use of them directly.\nThese rules are applied to the **git diff** of the  **pull request**.\n- **LineRule**: Apply a **condition** to all of the **added** and **modified lines** in the pull request.\n- **FileRule**: Apply a **condition** to all of the **added** and **modified files** in the pull request.\n- **ProtectedFilesRule**: Protect a list of files to be changed by someone hasn't permission to make a change.\n\n**Check the [Wiki](https://github.com/tarek360/koshry/wiki) to know How to write Koshry Rules**\n\n\n## Koshry works automatically with:\n- CI\n    - [Travis CI](https://travis-ci.com)\n    - [circle ci](https://circleci.com)\n    - [TeamCity](https://www.jetbrains.com/teamcity)\n    \n- Git host:\n  - Github\n  \n## Contribution\n- Feel free to fork and open a pull request.\n- Open an issue if you found a bug or you need help.\n  \n\n## How does Kosrhy work?\nIn a brief, when you call `Koshry.run(koshryConfig)`, Koshry applies all the rules you have set and it aggregates all of the reports returned from the rules to one report, then it posts that report as a comment on the pull request.\n\n**Note**: Kosrhy applies all of the rules sequentially.\n\n## I use Koshry in Koshry\nI use Koshry here in this repository to apply some rules like **JaCoCo Test Coverage** rule to set the minimum percentage of test coverage of PRs, check Koshry report on one of my PRs [here](https://github.com/tarek360/koshry/pull/18)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarek360%2Fkoshry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftarek360%2Fkoshry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarek360%2Fkoshry/lists"}