Swiftpack.co - yumemi-inc/danger-swift-eda as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by yumemi-inc.
yumemi-inc/danger-swift-eda v0.2.0
A danger-swift plug-in to check if the PR matches a specific workflow (e.g. Git-Flow)
⭐️ 4
🕓 1 week ago
.package(url: "https://github.com/yumemi-inc/danger-swift-eda.git", from: "v0.2.0")

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 :tada:
Merge Commit Non-Existence Check :tada:
Diff Volume Check :thinking:
ChangeLog Modification Check :thinking:
Warnings
:warning: This PR doesn't contain any modifications in CHANGELOG.md. Please consider to update the ChangeLog.
:warning: There's too much diff. Please make PRs smaller.

GitHub

link
Stars: 4
Last commit: 1 week ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Dependencies

Release Notes

0.2.0
1 week ago

What's Changed

New Contributors

Full Changelog: https://github.com/yumemi-inc/danger-swift-eda/compare/v0.1.2...v0.2.0

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics