Skip to content

Commit

Permalink
use rpassword
Browse files Browse the repository at this point in the history
  • Loading branch information
Its-Just-Nans committed Jan 8, 2025
1 parent 89c6bd8 commit a7146f6
Show file tree
Hide file tree
Showing 8 changed files with 170 additions and 33 deletions.
124 changes: 106 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "git-mover"
version = "1.0.2"
version = "1.0.3"
edition = "2021"
keywords = ["utility", "git", "cli"]
categories = ["command-line-utilities"]
Expand All @@ -19,6 +19,7 @@ home = "0.5.11"
log = "0.4.22"
rand = "0.8.5"
reqwest = { version = "0.12", features = ["json"] }
rpassword = "7.3.1"
serde = { version = "1.0.217", features = ["derive"] }
serde_json = "1.0.135"
tokio = { version = "1", features = ["full"] }
Expand Down
4 changes: 2 additions & 2 deletions src/codeberg/config.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Codeberg configuration
use super::platform::CodebergPlatform;
use crate::{config::Config, config_value_wrap};
use crate::{config::Config, config_password_wrap, config_value_wrap};
use serde::{Deserialize, Serialize};

/// Codeberg configuration
Expand All @@ -23,7 +23,7 @@ impl CodebergConfig {
username,
"your codeberg username"
);
let token = config_value_wrap!(
let token = config_password_wrap!(
config,
codeberg,
CodebergConfig,
Expand Down
4 changes: 2 additions & 2 deletions src/github/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use super::platform::GithubPlatform;
use serde::{Deserialize, Serialize};

use crate::{config::Config, config_value_wrap};
use crate::{config::Config, config_password_wrap, config_value_wrap};

/// Github configuration
#[derive(Deserialize, Serialize, Default, Debug, Clone)]
Expand All @@ -24,7 +24,7 @@ impl GithubConfig {
username,
"your github username"
);
let token = config_value_wrap!(
let token = config_password_wrap!(
config,
github,
GithubConfig,
Expand Down
4 changes: 2 additions & 2 deletions src/gitlab/config.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Gitlab configuration
use super::platform::GitlabPlatform;
use crate::config::Config;
use crate::config_value_wrap;
use crate::{config::Config, config_password_wrap};
use serde::{Deserialize, Serialize};

/// Gitlab configuration
Expand All @@ -24,7 +24,7 @@ impl GitlabConfig {
username,
"your gitlab username"
);
let token = config_value_wrap!(
let token = config_password_wrap!(
config,
gitlab,
GitlabConfig,
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub(crate) mod macros;
pub(crate) mod platform;
pub(crate) mod sync;
pub(crate) mod utils;
pub(crate) use macros::config_value;
pub(crate) use macros::config_password_wrap;
pub(crate) use macros::config_value_wrap;

mod codeberg;
Expand Down
Loading

0 comments on commit a7146f6

Please sign in to comment.