ConventionalCommitsKit

1.0.0

A small library to create and parse Conventional Commit conforming representations.
alexanderwe/ConventionalCommitsKit

What's New

v1.0.0

2020-12-28T16:14:43Z

Added

  • Ability to parse and create a type safe representation of a ConventionalCommit from a String

ConventionalCommitsKit

Swift 5.0 SPM CI

ConventionalCommitsKit is a small library to create and parse Conventional Commit conforming representations.

Installation

Swift Package Manager

To integrate using Apple's Swift Package Manager, add the following as a dependency to your Package.swift:

dependencies: [
    .package(url: "https://github.com/alexanderwe/ConventionalCommitsKit.git", from: "1.0.0")
]

Alternatively navigate to your Xcode project, select Swift Packages and click the + icon to search for ConventionalCommitsKit.

Manually

If you prefer not to use any of the aforementioned dependency managers, you can integrate ConventionalCommitsKit into your project manually. Simply drag the Sources Folder into your Xcode project.

Usage

At first import ConventionalCommitsKit

import ConventionalCommitsKit

Define a SemanticVersion based on a commit message. Be aware that the parsing can fail and the initializer will return nil in that case. After successfully creating a ConventionalCommit you have access to all of its properties

let commitMessage = """
fix: correct minor typos in code

see the issue for details

on typos fixed.

Reviewed-by #Z
Refs #133
"""

guard let commit = ConventionalCommit(data: commitMessage) else {
   return
}

Contributing

Contributions are very welcome 🙌

Description

  • Swift Tools 5.3.0

Dependencies

Last updated: Tue Jan 12 2021 10:39:46 GMT-0500 (GMT-05:00)