forked from kemitix/git-next
feat(server): add stub for branch::advance_main
This commit is contained in:
parent
0b5c91fedb
commit
7ed30fc382
1 changed files with 28 additions and 10 deletions
|
@ -1,18 +1,21 @@
|
|||
use actix::prelude::*;
|
||||
|
||||
use kxio::network;
|
||||
use tracing::{error, warn};
|
||||
|
||||
use crate::server::forge;
|
||||
use crate::server::{config, forge};
|
||||
|
||||
use super::StartMonitoring;
|
||||
use super::{RepoActor, StartMonitoring, StartRepo};
|
||||
|
||||
#[tracing::instrument(fields(forge_name = %repo_details.forge.name, repo_name = %repo_details.name))]
|
||||
pub async fn validate_positions(
|
||||
repo_details: crate::server::config::RepoDetails,
|
||||
config: crate::server::config::RepoConfig,
|
||||
addr: actix::prelude::Addr<super::RepoActor>,
|
||||
net: kxio::network::Network,
|
||||
repo_details: config::RepoDetails,
|
||||
config: config::RepoConfig,
|
||||
addr: Addr<RepoActor>,
|
||||
net: network::Network,
|
||||
) {
|
||||
let commit_histories = match repo_details.forge.forge_type {
|
||||
crate::server::config::ForgeType::ForgeJo => {
|
||||
config::ForgeType::ForgeJo => {
|
||||
forge::forgejo::get_commit_histories(&repo_details, &config, &net).await
|
||||
}
|
||||
};
|
||||
|
@ -67,11 +70,26 @@ pub async fn validate_positions(
|
|||
addr.do_send(StartMonitoring { main, next, dev });
|
||||
}
|
||||
|
||||
// advance next to the next commit towards the head of the dev branch
|
||||
#[allow(dead_code)]
|
||||
pub async fn advance_next(
|
||||
_next: forge::Commit,
|
||||
_repo_details: crate::server::config::RepoDetails,
|
||||
_addr: actix::prelude::Addr<super::RepoActor>,
|
||||
_net: kxio::network::Network,
|
||||
_repo_details: config::RepoDetails,
|
||||
addr: Addr<RepoActor>,
|
||||
_net: network::Network,
|
||||
) {
|
||||
// TODO: (#14) advance next one commit towards dev
|
||||
addr.do_send(StartRepo);
|
||||
}
|
||||
|
||||
// advance main branch to the commit 'next'
|
||||
#[allow(dead_code)]
|
||||
pub async fn advance_main(
|
||||
_next: forge::Commit,
|
||||
_repo_details: config::RepoDetails,
|
||||
addr: Addr<RepoActor>,
|
||||
_net: network::Network,
|
||||
) {
|
||||
// TODO: (#19) advance main to next
|
||||
addr.do_send(StartRepo);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue