Skip to content

Conversation

@amd989
Copy link

@amd989 amd989 commented Oct 3, 2025

Description

This PR adds Azure DevOps integration to git-cliff, enabling changelog generation with metadata from Azure DevOps repositories (commits, pull requests, and contributors).

Motivation and Context

git-cliff currently supports GitHub, GitLab, Gitea, and Bitbucket integrations, but lacks support for Azure DevOps - a widely used Git hosting platform by large enterprises. This change enables users hosting their repositories on Azure DevOps to leverage the same remote integration features available for other platforms.

How Has This Been Tested?

  • Added comprehensive fixture-based tests:
    • test-azure-devops-integration: Basic integration test with public Azure DevOps repository
    • test-azure-devops-integration-custom-range: Tests custom version range (v1.0.0..v1.0.1)
  • Both tests use the public repository: https://dev.azure.com/shiftme/gitcliff/_git/git-cliff-readme-example
  • Verified API integration fetches commits, pull requests, and contributor information correctly
  • All existing tests pass
  • Tested with Azure DevOps REST API v7.1

Screenshots / Logs (if applicable)

debug-log.txt

# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

- Support multiple file formats by @orhun


### Changed

- Use cache while fetching pages by @orhun

## [1.0.1] - 2021-07-18

### Added

- Add release script by @orhun


### Changed

- Expose string functions by @orhun

## [1.0.0] - 2021-07-18

### Added

- Add ability to parse arrays by @orhun


### Changed

- Initial commit by @orhun


### Fixed

- Rename help argument due to conflict by @orhun



### New Contributors
* @orhun made their first contribution[unreleased]: https://dev.azure.com/shiftme/gitcliff/_git/git-cliff-readme-example/branchCompare?baseVersion=GTv1.0.1&targetVersion=GBmaster&_a=commits
[1.0.1]: https://dev.azure.com/shiftme/gitcliff/_git/git-cliff-readme-example/branchCompare?baseVersion=GTv1.0.0&targetVersion=GTv1.0.1

<!-- generated by git-cliff -->

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (no code change)
  • Refactor (refactoring production code)
  • Other

Checklist:

  • My code follows the code style of this project.
  • I have updated the documentation accordingly.
  • I have formatted the code with rustfmt.
  • I checked the lints with clippy.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Note: This PR also includes improved error logging in remote/mod.rs for all remote integrations, which helps debug API failures by logging the actual error responses. If this is out of scope, I'm happy to revert those changes.

@amd989 amd989 requested a review from orhun as a code owner October 3, 2025 18:47
@welcome
Copy link

welcome bot commented Oct 3, 2025

Thanks for opening this pull request! Please check out our contributing guidelines! ⛰️

@codecov-commenter
Copy link

codecov-commenter commented Oct 3, 2025

Codecov Report

❌ Patch coverage is 45.37815% with 65 lines in your changes missing coverage. Please review.
✅ Project coverage is 45.08%. Comparing base (85cc05d) to head (b323f6c).

Files with missing lines Patch % Lines
git-cliff-core/src/changelog.rs 40.00% 21 Missing ⚠️
git-cliff-core/src/remote/azure_devops.rs 68.97% 18 Missing ⚠️
git-cliff-core/src/remote/mod.rs 0.00% 13 Missing ⚠️
git-cliff/src/lib.rs 0.00% 11 Missing ⚠️
git-cliff-core/src/config.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1283      +/-   ##
==========================================
+ Coverage   43.46%   45.08%   +1.63%     
==========================================
  Files          22       23       +1     
  Lines        1972     2083     +111     
==========================================
+ Hits          857      939      +82     
- Misses       1115     1144      +29     
Flag Coverage Δ
unit-tests 45.08% <45.38%> (+1.63%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@amd989
Copy link
Author

amd989 commented Oct 3, 2025

welp, I got to fix some things done

@amd989
Copy link
Author

amd989 commented Oct 4, 2025

All right, I think I managed to get all the checks in green.

Except for one about links but I believe these are unrelated to my changes

## Errors per input

### Errors in website/docs/installation/npm.md

* [403] [https://www.npmjs.com/package/git-cliff](https://www.npmjs.com/package/git-cliff) | Network error: Forbidden

Error: Process completed with exit code 2.

Please let me know if there anything else that needs changing!

@ognis1205
Copy link
Contributor

I’m not sure many developers are very familiar with Azure DevOps, but if it’s possible to use it freely, I’d be glad to help with reviewing this PR.

Since this PR is quite large, I think it might have been easier for reviewers (including @orhun) if an issue was opened first and the changes were split into smaller PRs.

Just a thought — I really appreciate the effort that went into this!

@amd989
Copy link
Author

amd989 commented Oct 11, 2025

Thank you for taking a look.

I’m not sure many developers are very familiar with Azure DevOps, but if it’s possible to use it freely, I’d be glad to help with reviewing this PR.

Microsoft offers a free tier that has some restrictions but enough to use it for small personal projects. You can enter into a subscription for more options later.

This is similar to Gitlab's pricing, and there is a git-cliff integration for that source control already.

image

The test fixture website I've set up is using this free tier: https://dev.azure.com/shiftme/gitcliff/_git/git-cliff-readme-example

NGL my intention with this PR was more towards users that use Azure DevOps in organizations where this is the prefered source control. But I get your point.

Since this PR is quite large, I think it might have been easier for reviewers (including @orhun) if an issue was opened first and the changes were split into smaller PRs.

Just a thought — I really appreciate the effort that went into this!

Edit: I've created an issue for this #1289

I'm unsure if splitting the changes is a good idea. All the changes in the PR, except for the ones I explicitly called out, are net new. And after you review some of the files, you'll notice this is just following a "copy" of the existing patterns... i.e. wherever there was gitlab/bitbucket/Gitea code, I added the azure_devops equivalent code.

Looking at #663 / #613 I notice more or less the number of same files. But I get it, if splitting makes sense to you all, I can work on chopping this up somehow...

@amd989 amd989 mentioned this pull request Oct 14, 2025
2 tasks
@ognis1205
Copy link
Contributor

I'll take a look soon.

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.

3 participants