Skip to content

Conversation

@tmeckel
Copy link
Owner

@tmeckel tmeckel commented Dec 5, 2025

AzureRM Service Endpoint Creation and Pipeline Permissions Management

This pull request implements the azdo service-endpoints create azurerm command and adds comprehensive pipeline permissions management capabilities for service endpoints.

Features

AzureRM Service Endpoint Creation ✨

  • New Command: azdo service-endpoints create azurerm - Create AzureRM service connections with full parameter support
  • Comprehensive Testing: Added acceptance tests for service endpoint creation workflow
  • Documentation: Generated documentation for the new AzureRM service endpoint command

Pipeline Permissions Management 🔐

  • New API Support: Added pipeline permissions and approvals client support
  • Mock Infrastructure: Created mock generation for pipeline permissions API
  • Service Endpoint Permissions: Added pipeline permissions management for service endpoints
  • Utility Functions: Added MapSlice and MapSlicePtr utility functions for safer slice transformations

Pull Request Enhancements 🎯

  • Labels Support: Added labels support to pull request view command
  • Reviewer Management: Fixed reviewer and label management in pull request edit command
  • Short Aliases: Added short aliases (c, cr) for project create command

Testing Infrastructure 🧪

  • Test Utilities: Added project context and value store to test helpers
  • Test File Management: Added utility functions for test file management
  • Comprehensive Coverage: Added tests for service endpoint creation and pipeline permissions

Documentation Improvements 📄

  • Clarifications: Added documentation about AZDO_ACC_PROJECT environment variable and TestContext utilities
  • Conventions: Clarified multi-value flag conventions and editing tools
  • Regenerated Docs: Recreated documentation to ensure consistency

Changes Summary

Major Features

  1. AzureRM Service Endpoint Creation - Complete implementation of azdo service-endpoints create azurerm command
  2. Pipeline Permissions API - Added support for managing pipeline permissions and approvals
  3. Service Endpoint Permissions - Enabled pipeline permissions management for service endpoints

Enhancements

  • Improved pull request management with labels and reviewer support
  • Added short aliases for project creation command
  • Enhanced test infrastructure with new utilities and helpers

Bug Fixes

  • Fixed AzureRM connection creation workflow implementation
  • Fixed reviewer and label management in pull request edit command

Documentation

  • Comprehensive documentation for new and existing features
  • Clarified development conventions and best practices

Testing

All changes include comprehensive test coverage:

  • Acceptance tests for service endpoint creation
  • Mock infrastructure for pipeline permissions API
  • Unit tests for utility functions
  • Integration tests for command workflows

Impact

This PR significantly enhances the Azure DevOps CLI with:

  • New service endpoint creation capabilities for AzureRM connections
  • Enhanced security management through pipeline permissions control
  • Improved developer experience with better testing tools and documentation
  • More robust pull request management with labels and reviewer support

Closes: #69

Add support for Azure DevOps pipeline permissions and approvals API clients.
This includes:
- PipelinePermissions client for managing resource pipeline permissions
- PipelinesApproval client for handling approval workflows
- PipelinesChecks client for check configurations and evaluations
- TaskCheck client for task-based checks
- Updated client factory and connection interfaces to support new clients
- Vendor dependencies for the new Azure DevOps Go API packages
- Add project field and environment variable support
- Implement thread-safe value store with SetValue/Value methods
- Add stub prompter implementation for acceptance tests
- Update test context to support project configuration
- Add comprehensive test coverage for new functionality
Add functionality to grant all pipelines access to a service endpoint in Azure
DevOps. Includes input validation, error handling with optional cleanup, and
integration with the pipeline permissions API client.
- Consolidate reviewer flags: add/remove required/optional reviewers with
  single `--add-required-reviewer`, `--add-optional-reviewer`, and
  `--remove-reviewer` flags
- Support wildcard (`*`) for removing all reviewers or labels
- Add reviewer promotion/demotion between required and optional states
- Improve label management with case-insensitive matching and wildcard support
- Add comprehensive examples in command help text
- Introduce reviewer intent tracking for more precise reviewer updates
- Add input validation for flag combinations
Add labels field to pull request JSON output and display labels in the template. Include labels in the JSON exportable fields and render them in the view output when present.
Add `WriteTestFile` and `WriteTestFileWithName` functions to create temporary
test files with random or specified names. Includes comprehensive test coverage for file creation, permissions, content validation, and error handling.
Tests verify endpoint creation, authentication scheme validation, and data integrity across different configuration scenarios. Includes temporary project provisioning, test resource cleanup, and polling mechanisms for async operations.
- update PR edit command to reflect new reviewer and label management features
- add aliases for PR view (status) and project/service endpoint creation commands
- improve JSON output options for PR view command
- add grant permission flag for AzureRM service endpoint creation
- standardize command examples and usage documentation
… and TestContext utilities

- Add AZDO_ACC_PROJECT to acceptance test environment variables for
  project-scoped resource testing
- Document new TestContext.Project() method and SetValue/Value helpers
  for cross-step data propagation
- Add WriteTestFile utility for creating test files with proper permissions
Add explicit guidance for multi-value flag semantics using `*` as a sentinel value and mandate git-aware patches for file modifications. Also introduce a new section encouraging reuse of existing helpers from `internal/types`.
@tmeckel tmeckel merged commit 296690f into master Dec 5, 2025
1 check passed
@tmeckel tmeckel deleted the tmeckel/issue69 branch December 5, 2025 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Implement azdo service-endpoint azurerm create command

2 participants