Skip to content

Conversation

@gladjohn
Copy link
Contributor

@gladjohn gladjohn commented Feb 26, 2025

Fixes #

Changes proposed in this request
This PR introduces a GitHub Actions workflow that automatically detects and blocks accidental additions of PublicAPI.Shipped.txt and PublicAPI.Unshipped.txt in .csproj files. This ensures that these files are not mistakenly committed, preventing unintended changes to the csproj structure.

Given that this is a commonly edited file this workflow should catch it.

This pull request introduces a new GitHub Actions workflow to prevent the addition of PublicAPI files in .csproj project files. The most important change is the creation of the prevent-publicapi-addition.yml workflow file.

New GitHub Actions workflow:

  • .github/workflows/prevent-publicapi-addition.yml: Added a workflow named "Prevent PublicAPI File Additions" that runs on pull requests. It checks out the code and scans for accidental references to PublicAPI.Shipped.txt or PublicAPI.Unshipped.txt in .csproj files, and fails the check if any are found.

Testing
build

Performance impact
none

Documentation

  • All relevant documentation is updated.

@gladjohn gladjohn requested a review from a team as a code owner February 26, 2025 17:12
@gladjohn
Copy link
Contributor Author

result from the run

image

@gladjohn gladjohn closed this Feb 26, 2025
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.

2 participants