Interface IPrBreakingChangeHelper
- Namespace
- Invex.RepoUtils.Atom.Module.Helpers
- Assembly
- Invex.RepoUtils.Atom.Module.dll
Orchestrates the end-to-end breaking change check for a pull request: it locates the most recent release to use as a baseline, identifies breaking changes against it, validates that the version has been bumped appropriately, and reports the result back to GitHub as a check run.
public interface IPrBreakingChangeHelper : IApiSurfaceHelper, IBuildAccessor
- Inherited Members
-
IBuildAccessor.GetService<T>()IBuildAccessor.GetServices<T>()IBuildAccessor.GetParam<T>(Expression<Func<T>>, T, Func<string, T>)IBuildAccessor.ServicesIBuildAccessor.LoggerIBuildAccessor.RootedFileSystemIBuildAccessor.ProcessRunner
Methods
FindLatestReleaseInfo(SemVer)
Finds the most recent release tag that represents a version older than the current version, to be used as the baseline for breaking change analysis.
ReleaseInfo? FindLatestReleaseInfo(SemVer currentVersion)
Parameters
currentVersionSemVerThe current version; only releases older than this are considered.
Returns
- ReleaseInfo
The ReleaseInfo for the highest version that precedes
currentVersion, or null when no suitable release tag exists.
PerformPrBreakingChangeCheck(SemVer, int, IEnumerable<RootedPath>, string, CancellationToken)
Runs the complete breaking change analysis for a pull request and publishes a GitHub check run summarizing the outcome.
Task PerformPrBreakingChangeCheck(SemVer currentVersion, int pullRequestNumber, IEnumerable<RootedPath> filesToCheck, string githubToken, CancellationToken cancellationToken)
Parameters
currentVersionSemVerThe semantic version produced for the current pull request.
pullRequestNumberintThe number of the pull request being checked.
filesToCheckIEnumerable<RootedPath>The API definition files whose changes should be analyzed.
githubTokenstringThe GitHub token used to authenticate the check run creation.
cancellationTokenCancellationTokenA token used to cancel the operation.
Returns
- Task
Remarks
When no previous release can be found, the check is skipped as there is no baseline to compare
against. Otherwise a check run is created with a success conclusion when the version has
been bumped to cover the detected changes, or failure when a required bump is missing.