diff --git a/src/integrations/git/mod.rs b/src/integrations/git/mod.rs index 6fc1e44..e6d6701 100644 --- a/src/integrations/git/mod.rs +++ b/src/integrations/git/mod.rs @@ -167,6 +167,7 @@ pub fn fast_forward_pull(repo: Repository, branch: &str) -> Result Option { let head = match repo.head() diff --git a/src/integrations/git/refresh.rs b/src/integrations/git/refresh.rs index ec0df28..c54fb4a 100644 --- a/src/integrations/git/refresh.rs +++ b/src/integrations/git/refresh.rs @@ -36,6 +36,8 @@ impl GitRefreshTask } } + /// Attempt a fast forward pull of the repo in [crate::config::ContentConfig::path] + /// clone if it is not there. Does nothing if [crate::config::GitConfig] is none pub fn pull(config: &Config) -> Option { @@ -72,6 +74,7 @@ impl GitRefreshTask None } + /// Send a discord message with [HeadInfo] if it is Some pub async fn notify_pull(info: Option, config: &Config) { match info diff --git a/src/integrations/github/mod.rs b/src/integrations/github/mod.rs index 576414a..ad41d2b 100644 --- a/src/integrations/github/mod.rs +++ b/src/integrations/github/mod.rs @@ -6,6 +6,9 @@ use crate::config::{Config, CONFIG_PATH}; use super::git::refresh::GitRefreshTask; +/// If user-agent is GitHub-Hookshot, check if +/// x-github-event is push. If so pull the repo if +/// [crate::config::GitConfig] is not None pub async fn filter_github ( headers: HeaderMap,