mirror of
https://github.com/orhun/git-cliff.git
synced 2024-09-11 06:55:38 +03:00
parent
4508d4d7a6
commit
be34949df7
@ -18,6 +18,7 @@ use git_cliff_core::{
|
||||
DEFAULT_OUTPUT,
|
||||
};
|
||||
use glob::Pattern;
|
||||
use secrecy::SecretString;
|
||||
use std::path::PathBuf;
|
||||
|
||||
#[derive(Debug, Clone, Copy, ValueEnum)]
|
||||
@ -227,7 +228,7 @@ pub struct Opt {
|
||||
value_name = "TOKEN",
|
||||
hide_env_values = true
|
||||
)]
|
||||
pub github_token: Option<String>,
|
||||
pub github_token: Option<SecretString>,
|
||||
/// Sets the GitHub repository.
|
||||
#[arg(
|
||||
long,
|
||||
|
@ -39,7 +39,6 @@ use git_cliff_core::{
|
||||
DEFAULT_CONFIG,
|
||||
IGNORE_FILE,
|
||||
};
|
||||
use secrecy::Secret;
|
||||
use std::env;
|
||||
use std::fs::{
|
||||
self,
|
||||
@ -126,8 +125,8 @@ fn process_repository<'a>(
|
||||
}
|
||||
|
||||
// Print debug information about configuration and arguments.
|
||||
log::trace!("{:#?}", args);
|
||||
log::trace!("{:#?}", config);
|
||||
log::trace!("Arguments: {:#?}", args);
|
||||
log::trace!("Config: {:#?}", config);
|
||||
|
||||
// Parse commits.
|
||||
let mut commit_range = args.range.clone();
|
||||
@ -399,7 +398,7 @@ pub fn run(mut args: Opt) -> Result<()> {
|
||||
}
|
||||
}
|
||||
if args.github_token.is_some() {
|
||||
config.remote.github.token = args.github_token.clone().map(Secret::new);
|
||||
config.remote.github.token = args.github_token.clone();
|
||||
}
|
||||
if let Some(ref remote) = args.github_repo {
|
||||
config.remote.github.owner = remote.0.owner.to_string();
|
||||
|
Loading…
Reference in New Issue
Block a user