azure_devops_rust_api 0.10.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_REPO_FILENAME=$4
ADO_PR_ID=$5
ADO_WIKI_ID=$6
ADO_WIKI_PAGE_PATH=$7
ADO_WIKI_CONTENT=$8

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

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_REPO_FILENAME" ];
then
    echo "Error: Missing repo_filename parameter"
    usage
    exit 1
fi

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

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

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

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

# Enable trace
set -x

cargo run --example artifacts_list --features="artifacts"
cargo run --example build_list --features="build"
cargo run --example build_list_sync --features="build"
cargo run --example core_org_projects --features="core"
cargo run --example core_project_teams --features="core"
cargo run --example distributed_task --features="distributed_task"
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_get_raw_rsp --features="git" $ADO_PROJECT_NAME
cargo run --example git_repo_list --features="git"
cargo run --example git_items_list --features="git" $ADO_REPO_NAME
cargo run --example git_items_get --features="git" $ADO_REPO_NAME $ADO_REPO_FILENAME
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 permissions_report --features="permissions_report"
cargo run --example pipeline_preview --features="pipelines" $ADO_PROJECT_NAME
cargo run --example pipelines --features="pipelines" $ADO_PROJECT_NAME
cargo run --example release --features="release"
cargo run --example release_get_release --features="release" $RELEASE_ID
cargo run --example service_endpoint --features="service_endpoint"
cargo run --example search_code --features="search"
cargo run --example search_repositories --features="search" $ADO_REPO_NAME
cargo run --example search_package --features="search" $PKG_NAME
cargo run --example search_work_item --features="search" $WORK_ITEM_SEARCH_TEXT
cargo run --example test_runs_list --features="test"
cargo run --example test_plan --features="test_plan"
cargo run --example client_pipeline_policy --features="git"
cargo run --example wiki_pages_create_or_update --features="wiki" $ADO_WIKI_ID $ADO_WIKI_PAGE_PATH $ADO_WIKI_CONTENT
cargo run --example wit_work_item_create --features="wit"
cargo run --example wit_work_item_queries --features="wit"

echo "Done"