From 58b81567354cf6c0bd3623e86deb7b6609b1f3be Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 1 Aug 2020 19:55:55 +0200 Subject: Get config We need the following values in order to build a `Client`: * GitHub token * Repo owner * Repo name Get the token from a command-line argument, or else the Git config, or else an environment variable. Get the repo identifiers from the repo's remote URL. Use the remote specified as a command-line argument, otherwise get it from the Git config, or else default to "origin". TODO: Only try to get the owner-name pair from the remote if a comment ID was given, not if a URL argument was passed. --- src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index a08be2b..494c389 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,5 @@ #![warn(rust_2018_idioms)] +pub mod config; + pub(crate) mod owner_repo; -- cgit v1.2.3