azure_devops_rust_api 0.6.0

Rust API library for Azure DevOps
Documentation
#!/usr/bin/env bash
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

# Exit on error
set -e

ADO_PROJECT_NAME=$1
ADO_USER_EMAIL=$2
ADO_REPO_NAME=$3
ADO_PR_ID=$4

usage () {
    echo "Usage:"
    echo "  ./run_all_examples <project_name> <user_email_address> <repo_name> <pr_id>"
}

if [ -z "$ADO_PROJECT_NAME" ];
then
    echo "Missing project_name parameter"
    usage
    exit 1
fi

if [ -z "$ADO_USER_EMAIL" ];
then
    echo "Error: Missing user_email_address parameter"
    usage
    exit 1
fi

if [ -z "$ADO_REPO_NAME" ];
then
    echo "Error: Missing repo_name parameter"
    usage
    exit 1
fi

if [ -z "$ADO_PR_ID" ];
then
    echo "Error: Missing pr_id parameter"
    usage
    exit 1
fi

# Enable trace
set -x

cargo run --example build_list --features="build"
cargo run --example core_org_projects --features="core"
cargo run --example core_project_teams --features="core"
cargo run --example extension_management_list --features="extension_management"
cargo run --example git_repo_get --features="git" $ADO_PROJECT_NAME
cargo run --example git_repo_list --features="git"
cargo run --example git_pr_commits  --features="git" $ADO_REPO_NAME $ADO_PR_ID
cargo run --example git_pr_files_changed  --features="git" $ADO_REPO_NAME $ADO_PR_ID
cargo run --example git_pr_work_items  --features="git" $ADO_REPO_NAME $ADO_PR_ID
cargo run --example graph_query --features="graph" $ADO_USER_EMAIL
cargo run --example hooks_list --features="hooks"
cargo run --example pipeline_preview --features="pipelines" $ADO_PROJECT_NAME
cargo run --example pipelines --features="pipelines" $ADO_PROJECT_NAME
cargo run --example service_endpoint --features="service_endpoint"
cargo run --example search_code --features="search"
cargo run --example test_runs_list --features="test"
cargo run --example client_pipeline_policy --features="git"

echo "Done"