GithubHelp home page GithubHelp logo

novr / danger-swift-eda Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yumemi-inc/danger-swift-eda

0.0 0.0 0.0 48 KB

A danger-swift plug-in to check if the PR matches a specific workflow (e.g. Git-Flow)

License: MIT License

Swift 100.00%

danger-swift-eda's Introduction

danger-swift-eda

A danger-swift plug-in to check if the PR matches a specific workflow (e.g. Git-Flow)

Install DangerSwiftEda

SwiftPM (Recommended)

  • Add dependency package to your Package.swift file which you import danger-swift

    // swift-tools-version:5.5
    ...
    let package = Package(
        ...
        dependencies: [
            ...
            // Danger Plugins
            .package(name: "DangerSwiftEda", url: "https://www.github.com/yumemi-inc/danger-swift-eda.git", from: "0.1.0"),
            ...
        ],
        ...
    )
  • Add the correct import to your Dangerfile.swift file

    import DangerSwiftEda

Marathon (Tool Deprecated)

  • Just add the dependency import to your Dangerfile.swift file like this:

    import DangerSwiftEda // package: https://github.com/yumemi-inc/danger-swift-eda.git

Usage

  • Setup a configuration based on the workflow you'd like to perform (currently only Git-Flow supported)

    let configuration = GitFlowCheckConfiguration(
        // ...
    )

    TIPS: We also have GitFlowCheckConfiguration.default if you just want to use default configuration.

  • Perform the workflow check with eda.checkPR method which is available for DangerDSL instances

    danger.eda.checkPR(workflow: .gitFlow(configuration)) // Assume you have initialized `danger` by code like `let danger = Danger()`

Preview

Code above will make danger producing markdown messages like below

Feature PR Check

Checking Item Result
Base Branch Check ๐ŸŽ‰
Merge Commit Non-Existence Check ๐ŸŽ‰
Diff Volume Check ๐Ÿค”
ChangeLog Modification Check ๐Ÿค”
Warnings
โš ๏ธ This PR doesn't contain any modifications in CHANGELOG.md. Please consider to update the ChangeLog.
โš ๏ธ There's too much diff. Please make PRs smaller.

danger-swift-eda's People

Contributors

el-hoshino avatar novr avatar ykws avatar

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.