This repository was archived by the owner on Jul 3, 2020. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,9 +13,12 @@ public static class Consts
1313
1414 public static string Username { get ; }
1515 public static string Password { get ; }
16- public static string Email { get ; }
16+
1717 public static string Token { get ; }
1818
19+ public static string CommitterName { get ; }
20+ public static string CommitterEmail { get ; }
21+
1922 public static JsonSerializerSettings SerializerSettings => new JsonSerializerSettings
2023 {
2124 ContractResolver = new Newtonsoft . Json . Serialization . DefaultContractResolver
@@ -36,8 +39,11 @@ static Consts()
3639 {
3740 Username = _GetString ( "GitHub:Username" ) ;
3841 Password = _GetString ( "GitHub:Password" ) ;
39- Email = _GetString ( "GitHub:Email" ) ;
42+
4043 Token = _GetString ( "GitHub:Token" ) ;
44+
45+ CommitterName = _GetString ( "GitHub:CommitterName" ) ;
46+ CommitterEmail = _GetString ( "GitHub:CommitterEmail" ) ;
4147 }
4248
4349 private static string _GetString ( string key )
@@ -47,7 +53,10 @@ private static string _GetString(string key)
4753 ?? Environment . GetEnvironmentVariable ( key , EnvironmentVariableTarget . Machine ) ;
4854
4955 if ( string . IsNullOrEmpty ( ev ) )
56+ {
5057 Console . WriteLine ( $ "Environment variable `{ key } ` not found.") ;
58+ return null ;
59+ }
5160 return ev ;
5261 }
5362 }
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ private readonly LibGit2Sharp.Handlers.CredentialsHandler CredentialsProvider
6565 } ;
6666 } ;
6767
68- public Identity CommandIdentity => new Identity ( Consts . Username , Consts . Email ) ;
68+ public Identity CommandIdentity => new Identity ( Consts . CommitterName , Consts . CommitterEmail ) ;
6969
7070 public string CurrentSha => Repo . Commits . First ( ) . Sha ;
7171
You can’t perform that action at this time.
0 commit comments