Skip to content

Commit 05221ab

Browse files
Copilotpetesramek
andauthored
chore: add CODEOWNERS, Code of Conduct, CHANGELOG, Source Link, and workflow fixes (#223)
## Summary Repository health improvements across 8 areas. ## Changes ### New files - **`.github/CODEOWNERS`** – assigns `@petesramek` as owner of `.github/`, `src/`, and `tests/` - **`CODE_OF_CONDUCT.md`** – Contributor Covenant 2.1 with "project maintainer" as enforcement contact - **`CHANGELOG.md`** – minimal changelog that links to the [GitHub Releases page](https://github.com/petesramek/polyline-algorithm-csharp/releases) ### Workflow fixes (`.github/workflows/pull-request.yml`) - **Fix trailing-quote bug** – removed stray `'` from the `dotnet-sdk-version` parameter in the `publish-development-package` job - **Fix benchmark `if` condition** – replaced invalid `github.env.is_release` context with `needs.workflow-variables.outputs.is-release == 'true'`; added `workflow-variables` to the benchmark job's `needs` so the output is available - **Add `security` job** – new job that runs `dotnet list src/PolylineAlgorithm/PolylineAlgorithm.csproj package --vulnerable --include-transitive` after build; fails on non-zero exit ### Source Link (`Directory.Build.props`) - Added `<EmbedUntrackedSources>true</EmbedUntrackedSources>` and `<DebugType>embedded</DebugType>` to the first `PropertyGroup` - Added `Microsoft.SourceLink.GitHub` version `8.*` (no known vulnerabilities per GitHub Advisory Database) to the analyzer `ItemGroup` ### Documentation (`docs/local-development.md`) - Added **"Required Repository Secrets and Variables"** section listing: - Secret: `NUGET_PACKAGE_FEED_API_KEY` - Variables: `NUGET_PACKAGE_FEED_URL`, `BENCHMARKDOTNET_RUN_OVERRIDE`, `BENCHMARKDOTNET_RUNTIMES`, `BENCHMARKDOTNET_FILTER`, `DEFAULT_BUILD_FRAMEWORK`, `SRC_DEFAULT_GLOB_PATTERN` ## Verification - `dotnet build PolylineAlgorithm.slnx --configuration Release` passes with 0 errors - CodeQL security scan: 0 alerts Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: petesramek <2333452+petesramek@users.noreply.github.com>
1 parent 303ae50 commit 05221ab

6 files changed

Lines changed: 100 additions & 3 deletions

File tree

.github/CODEOWNERS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
* @petesramek
2+
3+
.github/ @petesramek
4+
src/ @petesramek
5+
tests/ @petesramek

.github/workflows/pull-request.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,12 +222,28 @@ jobs:
222222
nuget-feed-api-key: ${{ secrets.NUGET_PACKAGE_FEED_API_KEY }}
223223
nuget-feed-server: 'AzureArtifacts'
224224
working-directory: ${{ runner.temp }}/${{ env.nuget-packages-directory }}
225-
dotnet-sdk-version: ${{ env.dotnet-sdk-version }}'
225+
dotnet-sdk-version: ${{ env.dotnet-sdk-version }}
226+
227+
security:
228+
name: 'Check for vulnerable packages'
229+
needs: [build]
230+
runs-on: ubuntu-latest
231+
steps:
232+
- name: 'Checkout ${{ github.head_ref || github.ref }}'
233+
uses: actions/checkout@v6
234+
235+
- name: 'Setup .NET'
236+
uses: actions/setup-dotnet@v5
237+
with:
238+
dotnet-version: ${{ env.dotnet-sdk-version }}
239+
240+
- name: 'Check for vulnerable packages'
241+
run: dotnet list src/PolylineAlgorithm/PolylineAlgorithm.csproj package --vulnerable --include-transitive
226242

227243
benchmark:
228-
if: ${{ github.env.is_release || vars.BENCHMARKDOTNET_RUN_OVERRIDE == 'true' }}
244+
if: ${{ needs.workflow-variables.outputs.is-release == 'true' || vars.BENCHMARKDOTNET_RUN_OVERRIDE == 'true' }}
229245
name: Benchmark with .NET CLI on ${{ matrix.os }}
230-
needs: [build]
246+
needs: [workflow-variables, build]
231247
strategy:
232248
matrix:
233249
os: [ubuntu-latest, windows-latest, macos-latest]

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Changelog
2+
3+
Release history is tracked via GitHub Releases.
4+
5+
See all releases at: <https://github.com/petesramek/polyline-algorithm-csharp/releases>

CODE_OF_CONDUCT.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Commitment
4+
5+
We are committed to providing a welcoming and inspiring community for all. We pledge to create an environment in which every individual feels valued, respected, and free from harassment and discrimination.
6+
7+
## Our Standards
8+
9+
Examples of behavior that contributes to creating a positive environment include:
10+
11+
- Using welcoming and inclusive language
12+
- Being respectful of differing opinions, viewpoints, and experiences
13+
- Gracefully accepting constructive criticism
14+
- Focusing on what is best for the community
15+
- Showing empathy towards other community members
16+
17+
Examples of unacceptable behavior include:
18+
19+
- The use of sexualized language or imagery and unwelcome sexual attention or advances
20+
- Trolling, insulting/derogatory comments, and personal or political attacks
21+
- Public or private harassment
22+
- Publishing others' private information, such as a physical or electronic address, without explicit permission
23+
- Other conduct which could reasonably be considered inappropriate in a professional setting
24+
25+
## Enforcement
26+
27+
Community leaders are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28+
29+
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for behaviors that they deem inappropriate, threatening, offensive, or harmful.
30+
31+
## Reporting
32+
33+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the project maintainer responsible for enforcement. All complaints will be reviewed and investigated promptly and fairly.
34+
35+
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
36+
37+
## Attribution
38+
39+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.
40+
41+
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
42+
43+
[homepage]: https://www.contributor-covenant.org
44+
45+
For answers to common questions about this code of conduct, see the FAQ at
46+
https://www.contributor-covenant.org/faq. Translations are available at
47+
https://www.contributor-covenant.org/translations.

Directory.Build.props

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
<ImplicitUsings>enable</ImplicitUsings>
77
<InvariantGlobalization>true</InvariantGlobalization>
88
<NeutralLanguage>en</NeutralLanguage>
9+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
10+
<DebugType>embedded</DebugType>
911
</PropertyGroup>
1012

1113
<PropertyGroup>
@@ -20,6 +22,7 @@
2022
<PackageReference Include="Meziantou.Analyzer" Version="3.*" PrivateAssets="all" />
2123
<PackageReference Include="SonarAnalyzer.CSharp" Version="10.*" PrivateAssets="all" />
2224
<PackageReference Include="SmartAnalyzers.ExceptionAnalyzer" Version="1.*" PrivateAssets="all" />
25+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.*" PrivateAssets="all" />
2326
</ItemGroup>
2427

2528
</Project>

docs/local-development.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,24 @@ The CI `format` job also runs `dotnet format` automatically on every push to non
7272
## Editor Configuration
7373

7474
Code style rules are stored in `.editorconfig` at the repository root. Any compliant IDE (Visual Studio, VS Code with C# Dev Kit, Rider) will pick these up automatically.
75+
76+
## Required Repository Secrets and Variables
77+
78+
The CI/CD workflows rely on the following GitHub repository secrets and variables.
79+
80+
### Secrets
81+
82+
| Name | Description |
83+
|------|-------------|
84+
| `NUGET_PACKAGE_FEED_API_KEY` | API key for the Azure Artifacts NuGet feed |
85+
86+
### Variables
87+
88+
| Name | Description |
89+
|------|-------------|
90+
| `NUGET_PACKAGE_FEED_URL` | NuGet feed URL |
91+
| `BENCHMARKDOTNET_RUN_OVERRIDE` | Set to `true` to force benchmarks to run on non-release PRs |
92+
| `BENCHMARKDOTNET_RUNTIMES` | Runtimes to benchmark (e.g. `net8.0 net10.0`) |
93+
| `BENCHMARKDOTNET_FILTER` | Benchmark filter pattern (e.g. `*`) |
94+
| `DEFAULT_BUILD_FRAMEWORK` | Default target framework for builds (e.g. `net10.0`) |
95+
| `SRC_DEFAULT_GLOB_PATTERN` | Glob pattern for source project files (e.g. `**/PolylineAlgorithm.csproj`) |

0 commit comments

Comments
 (0)