From eb74fee6be6876b86c97cdea0205ec970152358e Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 1 Aug 2020 01:38:07 +0200 Subject: Add a function to get an owner-repo pair from the Git repo remote This will allow us to accept suggestion IDs alone, without a full URL, like the following: $ git sugapply 459691747 # or $ git sugapply --remote upstream 459691747 # or $ git config github-suggestion.remote upstream $ git sugapply 459691747 We do this by extracting the pair from the remote URL. --- Cargo.lock | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Cargo.lock') diff --git a/Cargo.lock b/Cargo.lock index aa308c9..f4c3d6c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -264,6 +264,7 @@ version = "0.0.1" dependencies = [ "git2", "github-rs", + "github-suggestion-config", "regex", "serde", "serde_json", @@ -272,6 +273,15 @@ dependencies = [ "url", ] +[[package]] +name = "github-suggestion-config" +version = "0.0.1" +dependencies = [ + "git2", + "thiserror", + "url", +] + [[package]] name = "h2" version = "0.1.26" -- cgit v1.2.3