Giter VIP home page Giter VIP logo

koshry's Introduction

Koshry

What's Koshry?

Koshry:

  • is a dev tool, runs during your CI Build or on your Local Machine Build.
  • gives your team the ability to monitor pull requests and take automatic actions depend on your rules result.
  • 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.
  • is written in Kotlin and runs on JVM.
  • has some of the ready rules for common use cases.
  • is customizable, you can write your own Custom Rule, everything is a Rule in Koshry.
  • works on any project whatever the programming language you use in your project

Run Koshry in 3 steps:

1- Add Koshry to your build process:

Gradle:

implementation "io.github.tarek360.koshry:koshry:0.0.4"

2- Invoke Koshry with one rule at least.

val koshryConfig = koshry {
    rules {
        rule = rule1
        rule = rule2
    }
}

Koshry.run(koshryConfig)

3- Add one environment variable to your CI.

Add your git host (Github for example) token as an environment variable to allow Koshry post a comment and update the commit status. Use KOSHRY_GIT_HOST_TOKEN as a key of the environment variable.

Koshry Rules:

Each Koshry Rule does some work then returns a Report (or not) as a result of that work.

While you can create your own custom rule, Koshry has some of the ready rules, you can make use of them directly. These rules are applied to the git diff of the pull request.

  • LineRule: Apply a condition to all of the added and modified lines in the pull request.
  • FileRule: Apply a condition to all of the added and modified files in the pull request.
  • ProtectedFilesRule: Protect a list of files to be changed by someone hasn't permission to make a change.

Check the Wiki to know How to write Koshry Rules

Koshry works automatically with:

Contribution

  • Feel free to fork and open a pull request.
  • Open an issue if you found a bug or you need help.

How does Kosrhy work?

In 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.

Note: Kosrhy applies all of the rules sequentially.

I use Koshry in Koshry

I 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

koshry's People

Contributors

ahmedadeltito avatar tarek360 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

koshry's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.