[][src]Crate automaat_processor_git_clone

An Automaat processor to clone a Git repository.

Using this crate in your Automaat workflow allows you to clone an external repository into the Context workspace.

Plaintext username/password authentication is supported for private repositories.

Examples

Clone the Automaat repository into the workspace of the created context, and assert that the repository is in the correct location.

Since this repository is open to the public, no credentials are required.

The workspace is a temporary directory created on your file system. See the Context documentation for more details.

use automaat_core::{Context, Processor};
use automaat_processor_git_clone::GitClone;
use url::Url;

let context = Context::new()?;
let repo_url = Url::parse("https://github.com/blendle/automaat")?;

let processor = GitClone {
  url: repo_url,
  username: None,
  password: None,
  path: Some("automaat-repo".to_owned())
};

processor.run(&context)?;

assert!(context.workspace_path().join("automaat-repo/README.md").exists());

Package Features

  • juniper – creates a set of objects to be used in GraphQL-based requests/responses.

Structs

GitClone

The processor configuration.

Enums

Error

Represents all the ways that GitClone can fail.