Contributing
Contributing
Section titled “Contributing”Thank you for your interest in contributing to Purview Telemetry Source Generator!
Development Setup
Section titled “Development Setup”Prerequisites
Section titled “Prerequisites”- .NET 10 SDK (pinned via
global.json) - Bun — for package management and build scripts
- just — command runner
Quick Start
Section titled “Quick Start”git clone https://github.com/kjldev/purview-telemetry-sourcegeneratorcd purview-telemetry-sourcegeneratorbun installjust buildjust testCommon Commands
Section titled “Common Commands”| Command | Description |
|---|---|
just build |
Build the source generator and integration tests |
just test |
Run the 282 integration tests |
just format |
Format code according to .editorconfig rules |
just changeset |
Create a changeset for your changes |
just changeset-status |
Show pending changesets |
Making Changes
Section titled “Making Changes”- Fork the repository and create a feature branch
- Make your changes
- Run
just format && just build && just testto verify - If your change affects users (new feature, bug fix, deprecation), run
just changesetto describe it - Open a PR to
main
Changeset Requirement
Section titled “Changeset Requirement”Every PR that changes user-facing behaviour must include a changeset. A changeset is a small markdown file that describes what changed and what kind of version bump it warrants (patch / minor / major).
Create one with:
just changesetThis opens an interactive prompt — select the bump type and write a one-line summary. The file is committed with your changes.
PRs without a changeset will fail the Changeset Check status check. If your PR genuinely needs no release note (docs-only, CI fixes, dependency bumps), add the skip-changeset label.
Release Process
Section titled “Release Process”Releases are fully automated. Once your PR is merged:
- The changeset bot creates (or updates) a Version Packages PR
- Merging the Version PR triggers the CD pipeline
- The pipeline builds, tests, packs, and publishes a GitHub Release with NuGet artifacts
See docs/release-process.md for the full release process guide, including:
- How to set up the bot token (GitHub App / fine-grained PAT / classic PAT)
- GitHub ruleset configuration (branch + tag protection)
- DSC setup scripts for all account scopes (
personal,org,enterprise,ghes) - Immutable releases configuration
- Troubleshooting guide
Integration Tests and Snapshot Testing
Section titled “Integration Tests and Snapshot Testing”Integration tests use Verify for snapshot testing. If your change modifies generated code:
- Run
just test— tests will fail with*.received.*diff files - Review the diffs carefully
- Accept correct snapshots by copying
*.received.*→*.verified.*(or use the Verify IDE extension)
Never manually edit *.verified.* files — they are machine-generated only.
Code Style
Section titled “Code Style”- C# is formatted with CSharpier — run
just formatbefore committing - Only comment code that needs clarification; avoid noise comments
- Follow existing patterns in the codebase