Table of Contents

Interface IApiSurfaceHelper

Namespace
Invex.RepoUtils.Atom.Module.Helpers
Assembly
Invex.RepoUtils.Atom.Module.dll

Provides functionality for analyzing the public API surface of the repository by diffing the tracked API definition files between two commits and classifying the resulting changes as either major (removals) or minor (additions) breaking changes.

public interface IApiSurfaceHelper : IBuildAccessor
Inherited Members
IBuildAccessor.GetService<T>()
IBuildAccessor.GetServices<T>()
IBuildAccessor.GetParam<T>(Expression<Func<T>>, T, Func<string, T>)
IBuildAccessor.Services
IBuildAccessor.Logger
IBuildAccessor.RootedFileSystem
IBuildAccessor.ProcessRunner

Methods

IdentifyBreakingChanges(SemVer, string, SemVer, string, params IEnumerable<RootedPath>)

Compares the contents of the supplied files between two commits and determines which changes constitute breaking changes to the public API surface.

BreakingChanges IdentifyBreakingChanges(SemVer oldVersion, string oldCommitHash, SemVer newVersion, string newCommitHash, params IEnumerable<RootedPath> filesToCheck)

Parameters

oldVersion SemVer

The semantic version associated with oldCommitHash (used for logging).

oldCommitHash string

The SHA of the baseline commit to compare from.

newVersion SemVer

The semantic version associated with newCommitHash (used for logging).

newCommitHash string

The SHA of the commit to compare to.

filesToCheck IEnumerable<RootedPath>

The API definition files whose changes should be analyzed.

Returns

BreakingChanges

A BreakingChanges instance describing the major and minor breaking changes that were detected. When no relevant changes exist, the returned lists are empty.

Exceptions

InvalidOperationException

Thrown when either oldCommitHash or newCommitHash cannot be resolved to a commit in the repository.