Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
changelog:
exclude:
labels:
- ignore-for-release-notes
- CI
- CD
- test
- docs
categories:
- title: Breaking Changes 🛠
labels:
- Semver-Major
- Semver-Minor
- breaking-change
- title: Exciting New Features 🎉
labels:
- Semver-Patch
- enhancement
- title: Bug Fixes
labels:
- bugfix
- title: Other Changes
labels:
- "*"
47 changes: 47 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: git-url-parse

on:
push:
branches:
- staging
- trying
pull_request:
branches: [main]

env:
CARGO_TERM_COLOR: always

jobs:
ci:
name: CI
runs-on: ubuntu-latest
strategy:
matrix:
cargo_checks:
- name: Enforce default cargo fmt
subcommand: fmt -- --check
- name: Clippy
subcommand: clippy
- name: Test
subcommand: test --verbose
- name: Build
subcommand: build --release --all-features --verbose
steps:
- uses: actions/checkout@v2
- name: Stable with rustfmt and clippy
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v1
- name: cargo check - ${{ matrix.cargo_checks.name }}
run: cargo ${{ matrix.cargo_checks.subcommand }}
done:
name: Done
if: github.event_name == 'push' && github.ref == 'refs/heads/staging'
needs: [ci]
runs-on: ubuntu-latest
steps:
- name: Done
run: echo "Done!"
20 changes: 20 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Publish

on:
# push:
# branches: [master]
workflow_dispatch:

jobs:
publish:
name: Publish to crates.io
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: katyo/publish-crates@v1
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
15 changes: 0 additions & 15 deletions .github/workflows/rust.yml

This file was deleted.

8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# [0.4.0](https://github.com/tjtelan/git-url-parse-rs/compare/v0.3.1...v0.4.0)
- Migrate to Rust 2021
- Check for null bytes within input url before parsing (+ adding tests from [#16](https://github.com/tjtelan/git-url-parse-rs/issues/16))
- Replace `anyhow` with `color-eyre`
- Replace panic behavior with returning `Err()`
- Update dependencies
- Clippy/rustfmt fixes + add clippy/rustfmt checks to CI

# [0.3.1](https://github.com/tjtelan/git-url-parse-rs/compare/v0.3.0...v0.3.1)
- Loosen dependency restrictions in `Cargo.toml` ([#12](https://github.com/tjtelan/git-url-parse-rs/issues/12))
- Update `strum` + `strum_macros` ([#14](https://github.com/tjtelan/git-url-parse-rs/issues/14))
Expand Down
15 changes: 6 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,21 @@ authors = ["T.J. Telan <t.telan@gmail.com>"]
categories = ["parser-implementations", "encoding"]
description = "A parser for git repo urls based on url crate"
documentation = "https://docs.rs/git-url-parse"
edition = "2018"
edition = "2021"
keywords = ["git", "url", "parsing"]
license = "MIT"
name = "git-url-parse"
readme = "README.md"
repository = "https://github.com/tjtelan/git-url-parse-rs"
version = "0.3.1"

[badges.maintenance]
status = "actively-developed"
version = "0.4.0"

[dependencies]
log = "^0.4"
url = "^2.2"
strum = "^0.20"
strum_macros = "^0.20"
anyhow = "^1.0"
strum = "^0.22"
strum_macros = "^0.22"
color-eyre = "^0.5"
regex = "^1.4"

[dev-dependencies]
env_logger = "^0.8"
env_logger = "^0.9"
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# git-url-parse

[![Crates.io](https://img.shields.io/crates/v/git-url-parse)](https://crates.io/crates/git-url-parse)
![Crates.io](https://img.shields.io/crates/d/git-url-parse)
[![Github actions build status](https://github.com/tjtelan/git-url-parse-rs/workflows/git-url-parse/badge.svg)](https://github.com/tjtelan/git-url-parse-rs/actions/workflows/rust.yml)
[![docs.rs](https://docs.rs/git-url-parse/badge.svg)](https://docs.rs/git-url-parse/)
[![licence](https://img.shields.io/github/license/tjtelan/git-url-parse-rs)](LICENSE)
![Github actions build status](https://github.com/tjtelan/git-url-parse-rs/workflows/git-url-parse/badge.svg)
![Maintenance](https://img.shields.io/maintenance/yes/2021)

Supports common protocols as specified by the [Pro Git book](https://git-scm.com/book/en/v2)

Expand Down
6 changes: 6 additions & 0 deletions bors.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
status = [
"Done",
]
use_squash_merge = true
delete_merged_branches = true
timeout_sec = 900 # 15 mins
2 changes: 1 addition & 1 deletion examples/multi.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use anyhow::Result;
use color_eyre::Result;
use git_url_parse::GitUrl;

fn main() -> Result<()> {
Expand Down
2 changes: 1 addition & 1 deletion examples/trim_auth.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use anyhow::Result;
use color_eyre::Result;
use git_url_parse::GitUrl;

fn main() -> Result<()> {
Expand Down
Loading