pub mod stage;
pub mod commit;
pub mod push_pull;
pub mod rebase;
pub mod cherry_pick_revert;
pub mod reset;
pub mod branch_management;
pub mod remote;
pub mod pr;
pub mod log;
pub mod editor;
pub mod merge;
pub mod utils;
pub use stage::{StageFilesCommand, UnstageFilesCommand};
pub use commit::CommitCommand;
pub use push_pull::{PushCommand, PullCommand, PullRebaseCommand, PullMergeCommand, FetchAllPruneCommand};
pub use rebase::{RebaseSaveAndRunCommand, RebaseContinueCommand, RebaseSkipCommand, RebaseAbortCommand, RebaseResolveConflictsCommand, RebaseAbortFromConflictCommand, RebaseContinueInterruptedCommand, RebaseAbortInterruptedCommand};
pub use cherry_pick_revert::{CherryPickCommand, RevertCommand};
pub use reset::ResetCommand;
pub use branch_management::{ListMergedBranchesCommand, PruneMergedBranchesCommand};
pub use remote::{
RemotePruneCommand,
ShowRemoteUrlCommand,
SetRemoteSshCommand,
AutoFetchCommand,
};
pub use pr::{PrListCommand, PrCheckoutCommand, PrOpenCommand};
pub use log::{LogBriefCommand, LogStatsCommand};
pub use editor::OpenInEditorCommand;
pub use merge::CheckMergeStatusCommand;
#[cfg(test)]
mod tests {
use super::*;
use crate::app::AppState;
use crate::commands::Command;
use crate::services::GitService;
use crate::commands::git_commands::utils::to_github_pr_url;
use std::fs;
#[test]
fn to_github_pr_url_https() {
let url = "https://github.com/org/repo.git";
let ssh = to_github_pr_url(url, "12").unwrap();
assert_eq!(ssh, "https://github.com/org/repo/pull/12");
}
}