Files
windmill/backend/windmill-common/src/git_sync_oss.rs
wendrul 32fae7a10c feat: ansible playbook execution git repo mode (repo viewer + UI utils) (#6831)
* Improve minio on flake.nix

* Add first asset parsing logic for ansible

* Correct html gt sign

* Decouple s3 file picker from drawer

* Factor duplicate code into snippet

* Update S3FilePickerInner to be compatible

* Fix pane shrinking issue

* Git repo viewer

* Change GitRepoViewer

* Endpoints for git repo visualizer

* Move git repo viewer to its own component

* Add button to populate git repo viewer

* Update parser yaml for new ansisble features (repo viewer)

* Reflect parser changes for ansible

* Add button to add the git repo mode of declaration for ansible

* Factor function

* Playbook + inventories into the drawer

* Add button to add inventories from s3

* Move tests to lib.rs

* Inventory loading from s3

* Move get github app token logic to be reused by ansible

* Update parser and ansible executor

* Use the correct path for inventories

* Add nushell to flake for wasm builds

* Add published parser

* Update hubPaths with clone and upload to s3

* Update ee-repo to the branch ref

* Fix npm run check

* Update cargo.lock

* Change labels on buttons

* Remove debug log

* Update ee-repo-ref

* Fix ee issues

* Update ee-repo ref

* Fix typo

* Fix ee

* Update ee-repo-ref

* Fix missing imports

* Unused var

* Fix typo

* Layout improvents

* Fix typos

* Remove unused function and log

---------

Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
2025-10-16 09:08:18 +00:00

32 lines
880 B
Rust

#[cfg(feature = "private")]
#[allow(unused)]
pub use crate::git_sync_ee::*;
use url::Url;
#[cfg(not(feature = "private"))]
use sqlx::{Pool, Postgres};
#[cfg(not(feature = "private"))]
pub async fn get_github_app_token_internal(
_db: &Pool<Postgres>,
_job_token: &str,
) -> crate::error::Result<String> {
return Err(crate::error::Error::BadRequest("Github app authentication is not available on the open source build".to_string()))
}
pub fn prepend_token_to_github_url(
github_url: &str,
installation_token: &str,
) -> crate::error::Result<String> {
let url = Url::parse(github_url)?;
if url.host_str() != Some("github.com") {
return Err(crate::error::Error::BadRequest("Invalid: not a github URL".to_string()));
}
Ok(format!(
"https://x-access-token:{}@github.com{}",
installation_token,
url.path()
))
}