Skip to content

feat(azure): emit approval changes for release environments#1965

Merged
moshloop merged 3 commits intomainfrom
pr/ado-fixes
Mar 9, 2026
Merged

feat(azure): emit approval changes for release environments#1965
moshloop merged 3 commits intomainfrom
pr/ado-fixes

Conversation

@moshloop
Copy link
Copy Markdown
Member

@moshloop moshloop commented Mar 9, 2026

Summary by CodeRabbit

Release Notes

  • New Features

    • Azure DevOps pipelines now support inline YAML content retrieval and embedding.
    • Pipeline and release approval decisions are now tracked and displayed as changes.
    • New capability to fetch repository files directly through Azure DevOps.
  • Changes

    • Modified pipeline label generation behavior.

moshloop added 3 commits March 9, 2026 14:42
… labels

- Add GetRepositoryFile to fetch pipeline YAML content from Git API
- Include YAML definition content in pipeline config
- Remove TemplateParameters and Variables from GetLabels() since they
  are per-run values, not pipeline properties
…kipped

Seed uniquePipelines with the base pipeline before the runs loop so
a config item is always returned regardless of terminal cache or cutoff.
@moshloop moshloop enabled auto-merge (rebase) March 9, 2026 12:43
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 9, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 56dd2803-518a-4550-855b-894452eaed85

📥 Commits

Reviewing files that changed from the base of the PR and between d0287f4 and bff05a6.

📒 Files selected for processing (6)
  • scrapers/azure/devops/client.go
  • scrapers/azure/devops/pipelines.go
  • scrapers/azure/devops/pipelines_test.go
  • scrapers/azure/devops/releases.go
  • scrapers/azure/devops/releases_test.go
  • scrapers/azure/devops/run_state.go

Walkthrough

The Azure DevOps scraper is enhanced to capture approval events as change records. Repository YAML content can now be fetched and stored inline alongside configuration paths. Pipeline and release approval processing introduces helper functions to transform approvals into ChangeResult entries with approver resolution and severity tracking. New change type constants (Approved, Rejected) are defined for approval state representation.

Changes

Cohort / File(s) Summary
Azure DevOps Client
scrapers/azure/devops/client.go
Added YamlContent field to PipelineDefinition struct and new GetRepositoryFile method to fetch YAML content from repositories via Azure DevOps Items API.
Pipeline Approval Changes
scrapers/azure/devops/pipelines.go
Introduced pipelineApprovalChanges helper function to convert approvals into ChangeResult entries. Enhanced pipeline processing with base-pipeline seeding, per-pipeline Config/Format/Properties assembly, and modified GetLabels to return empty map.
Release Approval Changes
scrapers/azure/devops/releases.go
Added releaseApprovalChanges helper function to transform release approvals into ChangeResult entries with status mapping, approver resolution, severity computation, and ExternalChangeID formatting.
Change Type Definitions
scrapers/azure/devops/run_state.go
Introduced ChangeTypeApproved and ChangeTypeRejected constants for approval state tracking.
Pipeline Tests
scrapers/azure/devops/pipelines_test.go
Added test suites for pipelineApprovalChanges, GetLabels, and buildPipelineConfig. Updated buildReleaseResult expectations to account for approval-change events.
Release Tests
scrapers/azure/devops/releases_test.go
Added test suite for releaseApprovalChanges validating approval filtering, type emission, creator resolution, and field population.
✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch pr/ado-fixes

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@moshloop moshloop merged commit 820d849 into main Mar 9, 2026
12 of 15 checks passed
@moshloop moshloop deleted the pr/ado-fixes branch March 9, 2026 12:59
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.

1 participant