Invex.RepoUtils.Atom.Module
1.5.0
See the version list below for details.
dotnet add package Invex.RepoUtils.Atom.Module --version 1.5.0
NuGet\Install-Package Invex.RepoUtils.Atom.Module -Version 1.5.0
<PackageReference Include="Invex.RepoUtils.Atom.Module" Version="1.5.0" />
<PackageVersion Include="Invex.RepoUtils.Atom.Module" Version="1.5.0" />
<PackageReference Include="Invex.RepoUtils.Atom.Module" />
paket add Invex.RepoUtils.Atom.Module --version 1.5.0
#r "nuget: Invex.RepoUtils.Atom.Module, 1.5.0"
#:package Invex.RepoUtils.Atom.Module@1.5.0
#addin nuget:?package=Invex.RepoUtils.Atom.Module&version=1.5.0
#tool nuget:?package=Invex.RepoUtils.Atom.Module&version=1.5.0
Invex .NET Repo Utils
A collection of .NET utilities for building and maintaining .NET repositories.
Invex.RepoUtils bundles the tooling the Invex team uses to keep its .NET repositories
consistent, well-versioned, and safe to release. It ships three complementary pieces:
- A Roslyn analyzer that enforces explicit annotation of your public API surface.
- A test utilities library for snapshot-testing your public API surface.
- An Atom build module that adds reusable CI/CD targets for packing, testing, releasing, breaking-change detection, documentation generation, and Dependabot automation.
Table of contents
- Packages
- Invex.RepoUtils.PublicApiAnalyzers
- Invex.RepoUtils.TestUtils
- Invex.RepoUtils.Atom.Module
- Repository structure
- Building & testing
- Versioning
- Contributing
- License
Packages
| Package | Description | Target |
|---|---|---|
Invex.RepoUtils.PublicApiAnalyzers |
Roslyn analyzer that flags public members not annotated as part of the public API surface. | netstandard2.0 |
Invex.RepoUtils.TestUtils |
Test utilities for snapshot-testing your assembly's public API surface. | netstandard2.0, net8.0, net9.0, net10.0 |
Invex.RepoUtils.Atom.Module |
Atom build module providing pack/test/release, breaking-change, and Dependabot CI targets. | net10.0 |
Invex.RepoUtils.PublicApiAnalyzers
A Roslyn diagnostic analyzer that helps you keep an intentional public API surface. It reports
every effectively-public member that is not annotated with [PublicAPI] (or another attribute
you allow), so that exposing a new type or member is always a deliberate, reviewable decision.
Installation
dotnet add package Invex.RepoUtils.PublicApiAnalyzers
The package is shipped as a development dependency (analyzer only) — it contributes no runtime assemblies to your output.
Rules
| Rule ID | Category | Severity | Description |
|---|---|---|---|
IPAA0001 |
Design | Warning | Public member should be annotated with [PublicAPI] (or another configured valid attribute). |
The analyzer is attribute-aware and intentionally avoids false positives:
- It walks the containing-type chain, so a member is considered annotated when it — or any of its containing types — carries a valid attribute.
- Implicitly declared members, property/event accessors, constructors, and
overridemembers are ignored. - A member is only flagged when it is effectively public (public all the way up its containing type chain).
Configuration
By default the analyzer accepts PublicAPI / PublicAPIAttribute. You can extend the set of
attributes that satisfy the rule via an .editorconfig entry. Provide a comma-separated list of
attribute names (the Attribute suffix is optional — both forms are accepted):
# .editorconfig
[*.cs]
dotnet_code_quality.Invex_RepoUtils_PublicApiAnalyzers_ValidPublicApiAttributes = Experimental, MyCompanyApi
To change the severity of the rule:
[*.cs]
dotnet_diagnostic.IPAA0001.severity = error
Example
using JetBrains.Annotations;
// ⚠️ IPAA0001 — public type is not annotated.
public class Unmarked { }
// ✅ Annotated type — the type and all its public members are considered part of the API surface.
[PublicAPI]
public class Marked
{
public int Value { get; set; }
}
Invex.RepoUtils.TestUtils
A test utility library that makes it easy to snapshot-test the public API surface of your assemblies. It uses reflection to extract all public types and their members, serialises the result to JSON, and pairs well with Verify for approval-based testing.
Installation
dotnet add package Invex.RepoUtils.TestUtils
Usage
Call PublicApiSurfaceTestUtil.GetPublicApiSurface with the assembly you want to inspect. The
returned JSON string can be verified with your preferred snapshot testing library:
using Invex.RepoUtils.TestUtils;
[Test]
public Task PublicApiSurface()
{
var surface = PublicApiSurfaceTestUtil.GetPublicApiSurface(typeof(MyLibType).Assembly);
return Verify(surface);
}
Invex.RepoUtils.Atom.Module
An Atom build module that contributes reusable, opinionated
CI/CD building blocks. Add the interfaces you need to your Atom IBuild definition and wire the
provided Targets into your workflows.
Installation
dotnet add package Invex.RepoUtils.Atom.Module
Targets
| Target | Interface | Purpose |
|---|---|---|
ApproveDependabotPr |
IApproveDependabotPr |
Enables auto-merge on pull requests opened by dependabot[bot]. |
CheckPrForBreakingChanges |
ICheckPrForBreakingChanges |
Detects public API breaking changes in a PR and reports the result as a GitHub check run. |
WaitForCopilotReview |
IWaitForCopilotReview |
Blocks until GitHub Copilot has finished reviewing a PR (e.g. before enabling auto-merge). |
Helpers
| Helper | Purpose |
|---|---|
IApiSurfaceHelper |
Diffs API definition files between two commits and classifies major/minor breaking changes. |
IPrBreakingChangeHelper |
Orchestrates the full PR breaking-change check against the latest release baseline. |
IGithubPrHelper |
Surfaces the GitHub pull-request number parameter for PR-scoped targets. |
INugetPackageUnlistHelper |
Discovers superseded prereleases (or all prereleases below a given stable version) via the NuGet flat-container API and unlists them with resilient HTTP DELETE calls, writing a summary to the Atom build report. |
IDocFxHelper |
Builds, serves, and publishes DocFX documentation to a project's gh-pages branch for GitHub Pages hosting. |
ICopilotReviewHelper |
Polls a pull request until GitHub Copilot has finished reviewing it, failing on timeout. |
DependabotEnableAutoMergePat |
Adds GitHub-specific injection options: BuildOptions.Inject.Github.PullRequestNumber (PR number from the event payload) and BuildOptions.Inject.Github.DependabotEnableAutoMergePat (the Dependabot auto-merge PAT secret). |
The breaking-change check compares the current build version against the most recent release tag
(v{semver}). It classifies removals from the public API surface as major changes and
additions as minor changes, then verifies the version has been bumped appropriately and posts
a pass/fail GitHub check run with a detailed summary.
Usage
Add the desired interfaces to your build definition and reference the targets from a workflow:
[BuildDefinition]
[GenerateEntryPoint]
internal interface IBuild :
IWorkflowBuildDefinition,
IApproveDependabotPr,
ICheckPrForBreakingChanges
{
// Point the breaking-change check at your public API definition files.
IEnumerable<RootedPath> ICheckPrForBreakingChanges.BreakingChangeFilesToCheck =>
[
// e.g. RootedFileSystem.AtomRootDirectory / "src/MyLib/PublicAPI.Shipped.txt",
];
}
See _atom/IBuild.cs for the full build definition used by this repository,
including the Validate, Build, and Dependabot auto-merge workflows.
Repository structure
.
├── _atom/ # Atom build definition for this repo (IBuild.cs)
├── src/
│ ├── Invex.RepoUtils.Atom.Module/ # Atom CI/CD module (targets, helpers, models)
│ ├── Invex.RepoUtils.PublicApiAnalyzers/ # Roslyn public-API analyzer
│ └── Invex.RepoUtils.TestUtils/ # Test utilities for public API surface snapshots
├── tests/
│ ├── Invex.RepoUtils.Atom.Module.Tests/
│ ├── Invex.RepoUtils.PublicApiAnalyzers.Tests/
│ └── Invex.RepoUtils.TestUtils.Tests/
├── Directory.Build.props # Shared build settings
├── GitVersion.yml # Versioning configuration
└── Invex.RepoUtils.slnx # Solution
Building & testing
The repository targets .NET 10 and uses C# 14, with TreatWarningsAsErrors enabled.
# Restore & build the whole solution
dotnet build Invex.RepoUtils.slnx
# Run the analyzer test suite
dotnet test
The analyzer is validated across .NET 8, 9, and 10 reference assemblies in CI.
Versioning
Versions are derived automatically by GitVersion using Conventional Commits. The commit message prefix drives the bump:
| Prefix | Bump |
|---|---|
breaking: / major: |
Major |
feat: / feature: / minor: |
Minor |
fix: / patch: |
Patch |
semver-none / semver-skip |
None |
Contributing
Contributions are welcome! Please:
- Use Conventional Commit messages so versioning works correctly.
- Annotate new public members with
[PublicAPI]— the analyzer in this repo enforces it. - Add or update tests for analyzer changes.
- Ensure
dotnet buildanddotnet testpass before opening a PR.
The Validate workflow runs the build, the test matrix, and the breaking-change check on every
pull request into main.
License
Licensed under the MIT License. Copyright © 2026 Invex Games.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Invex.Atom.Module.Dotnet (>= 3.0.0)
- Invex.Atom.Module.GithubWorkflows (>= 3.0.0)
- LibGit2Sharp (>= 0.31.0)
- Octokit.GraphQL (>= 0.4.0-beta)
-
net8.0
- Invex.Atom.Module.Dotnet (>= 3.0.0)
- Invex.Atom.Module.GithubWorkflows (>= 3.0.0)
- LibGit2Sharp (>= 0.31.0)
- Octokit.GraphQL (>= 0.4.0-beta)
-
net9.0
- Invex.Atom.Module.Dotnet (>= 3.0.0)
- Invex.Atom.Module.GithubWorkflows (>= 3.0.0)
- LibGit2Sharp (>= 0.31.0)
- Octokit.GraphQL (>= 0.4.0-beta)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.6.0-rc.2 | 39 | 6/12/2026 |
| 1.5.0 | 411 | 6/11/2026 |
| 1.4.0 | 204 | 6/10/2026 |
| 1.4.0-rc.5 | 39 | 6/10/2026 |
| 1.3.1-rc.1 | 41 | 6/10/2026 |
| 1.3.0 | 161 | 6/10/2026 |
| 1.2.0 | 49 | 6/9/2026 |
| 1.1.0 | 47 | 6/9/2026 |