Skip to content

Commit 62ce79f

Browse files
committed
Merge commit '32edc9b8e5aa8f3151b761f635a205679e1e29f4' into future-main
2 parents 2dcbf25 + 32edc9b commit 62ce79f

File tree

12 files changed

+192
-84
lines changed

12 files changed

+192
-84
lines changed

.github/release.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
changelog:
2+
exclude:
3+
labels:
4+
- ignore-for-release-notes
5+
- CI
6+
- CD
7+
- test
8+
- docs
9+
categories:
10+
- title: Breaking Changes 🛠
11+
labels:
12+
- Semver-Major
13+
- Semver-Minor
14+
- breaking-change
15+
- title: Exciting New Features 🎉
16+
labels:
17+
- Semver-Patch
18+
- enhancement
19+
- title: Bug Fixes
20+
labels:
21+
- bugfix
22+
- title: Other Changes
23+
labels:
24+
- "*"

.github/workflows/ci.yml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- staging
7+
- trying
8+
pull_request:
9+
branches: [main]
10+
workflow_dispatch:
11+
12+
env:
13+
CARGO_TERM_COLOR: always
14+
15+
jobs:
16+
ci:
17+
name: CI
18+
runs-on: ubuntu-latest
19+
strategy:
20+
matrix:
21+
cargo_checks:
22+
- name: Enforce default cargo fmt
23+
subcommand: fmt -- --check
24+
- name: Clippy
25+
subcommand: clippy
26+
- name: Test
27+
subcommand: test --verbose
28+
- name: Build
29+
subcommand: build --release --all-features --verbose
30+
steps:
31+
- uses: actions/checkout@v2
32+
- name: Stable with rustfmt and clippy
33+
uses: actions-rs/toolchain@v1
34+
with:
35+
profile: minimal
36+
toolchain: stable
37+
components: rustfmt, clippy
38+
- uses: Swatinem/rust-cache@v1
39+
- name: cargo check - ${{ matrix.cargo_checks.name }}
40+
run: cargo ${{ matrix.cargo_checks.subcommand }}
41+
done:
42+
name: Done
43+
if: github.event_name == 'push' && github.ref == 'refs/heads/staging'
44+
needs: [ci]
45+
runs-on: ubuntu-latest
46+
steps:
47+
- name: Done
48+
run: echo "Done!"

.github/workflows/publish.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Publish
2+
3+
on:
4+
# push:
5+
# branches: [master]
6+
workflow_dispatch:
7+
8+
jobs:
9+
publish:
10+
name: Publish to crates.io
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: actions-rs/toolchain@v1
15+
with:
16+
toolchain: stable
17+
override: true
18+
- uses: katyo/publish-crates@v1
19+
with:
20+
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}

.github/workflows/rust.yml

-15
This file was deleted.

CHANGELOG.md

+13-5
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,37 @@
1+
# [0.4.0](https://github.com/tjtelan/git-url-parse-rs/compare/v0.3.1...v0.4.0)
2+
- Migrate to Rust 2021
3+
- Check for null bytes within input url before parsing (+ adding tests from [#16](https://github.com/tjtelan/git-url-parse-rs/issues/16))
4+
- Replace `anyhow` with `color-eyre`
5+
- Replace panic behavior with returning `Err()`
6+
- Update dependencies
7+
- Clippy/rustfmt fixes + add clippy/rustfmt checks to CI
8+
19
# [0.3.1](https://github.com/tjtelan/git-url-parse-rs/compare/v0.3.0...v0.3.1)
210
- Loosen dependency restrictions in `Cargo.toml` ([#12](https://github.com/tjtelan/git-url-parse-rs/issues/12))
311
- Update `strum` + `strum_macros` ([#14](https://github.com/tjtelan/git-url-parse-rs/issues/14))
412

5-
# [0.3.0](https://github.com/tjtelan/git-url-parse-rs/compare/v0.2.0...v0.3.0)
13+
# [0.3.0](https://github.com/tjtelan/git-url-parse-rs/compare/v0.2.0...v0.3.0) (2020-10-02)
614
- Add `CHANGELOG.md`
715
- Add new schemes `Ftp` and `Ftps`
816
- Update `GitUrl` format for `Scheme::File` for `GitUrl.host` and `GitUrl.path`
917
- Add more tests
1018

11-
# [0.2.0](https://github.com/tjtelan/git-url-parse-rs/compare/v0.1.1...v0.2.0)
19+
# [0.2.0](https://github.com/tjtelan/git-url-parse-rs/compare/v0.1.1...v0.2.0) (2020-05-13)
1220
- Updating `GitUrl` format
1321
- Add `trim_auth()`
1422
- Add `impl Display` for `GitUrl`
1523
- Rename enum `Protocol` to `Scheme`
1624

17-
# [0.1.1](https://github.com/tjtelan/git-url-parse-rs/compare/v0.1.0...v0.1.1)
25+
# [0.1.1](https://github.com/tjtelan/git-url-parse-rs/compare/v0.1.0...v0.1.1) (2020-05-09)
1826
- Add CI via Github Actions
1927
- Add badges for docs, crates, build to `README`
2028
- Update `README.md`
2129
- Making enums and Structs `Clone`
2230

23-
# [0.1.0](https://github.com/tjtelan/git-url-parse-rs/compare/v0.0.1...v0.1.0)
31+
# [0.1.0](https://github.com/tjtelan/git-url-parse-rs/compare/v0.0.1...v0.1.0) (2020-02-05)
2432
- Add support for Azure DevOps
2533
- Add `README.md`
2634

27-
# [0.0.1](https://github.com/tjtelan/git-url-parse-rs/commit/9255fc3f0516e6cfa60c651dd0436fa702b701b1)
35+
# [0.0.1](https://github.com/tjtelan/git-url-parse-rs/commit/9255fc3f0516e6cfa60c651dd0436fa702b701b1) (2020-01-21)
2836
- Pre-process urls before feeding to `url` crate
2937
- Specialized normalization rules between ssh or file path urls

Cargo.toml

+6-9
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,21 @@ authors = ["T.J. Telan <[email protected]>"]
33
categories = ["parser-implementations", "encoding"]
44
description = "A parser for git repo urls based on url crate"
55
documentation = "https://docs.rs/git-url-parse"
6-
edition = "2018"
6+
edition = "2021"
77
keywords = ["git", "url", "parsing"]
88
license = "MIT"
99
name = "git-url-parse"
1010
readme = "README.md"
1111
repository = "https://github.com/tjtelan/git-url-parse-rs"
12-
version = "0.3.1"
13-
14-
[badges.maintenance]
15-
status = "actively-developed"
12+
version = "0.4.0"
1613

1714
[dependencies]
1815
log = "^0.4"
1916
url = "^2.2"
20-
strum = "^0.20"
21-
strum_macros = "^0.20"
22-
anyhow = "^1.0"
17+
strum = "^0.22"
18+
strum_macros = "^0.22"
19+
color-eyre = "^0.5"
2320
regex = "^1.4"
2421

2522
[dev-dependencies]
26-
env_logger = "^0.8"
23+
env_logger = "^0.9"

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# git-url-parse
22

33
[![Crates.io](https://img.shields.io/crates/v/git-url-parse)](https://crates.io/crates/git-url-parse)
4+
![Crates.io](https://img.shields.io/crates/d/git-url-parse)
5+
[![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)
46
[![docs.rs](https://docs.rs/git-url-parse/badge.svg)](https://docs.rs/git-url-parse/)
57
[![licence](https://img.shields.io/github/license/tjtelan/git-url-parse-rs)](LICENSE)
6-
![Github actions build status](https://github.com/tjtelan/git-url-parse-rs/workflows/git-url-parse/badge.svg)
8+
![Maintenance](https://img.shields.io/maintenance/yes/2021)
79

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

bors.toml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
status = [
2+
"Done",
3+
]
4+
use_squash_merge = true
5+
delete_merged_branches = true
6+
timeout_sec = 900 # 15 mins

examples/multi.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use anyhow::Result;
1+
use color_eyre::Result;
22
use git_url_parse::GitUrl;
33

44
fn main() -> Result<()> {

examples/trim_auth.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use anyhow::Result;
1+
use color_eyre::Result;
22
use git_url_parse::GitUrl;
33

44
fn main() -> Result<()> {

0 commit comments

Comments
 (0)