Skip to content

Commit fd3e5fb

Browse files
devlooped-botkzu
authored andcommitted
⬆️ Bump files with dotnet-file sync
# devlooped/oss - Enhance documentation instructions for project work devlooped/oss@e616d89 - Avoid failure on PR creation if osmfeula.txt doesn't exist in repo devlooped/oss@8ff5178 - Update create-pull-request action to version 8 devlooped/oss@0662872 - Switch to dnx retest shorthand devlooped/oss@fddfd89 - Ignore *.local recursively devlooped/oss@a225b7a - Ensure quiet confirmation of tool download/install devlooped/oss@e11b002 - Ensure dnx run succeeds even on Windows devlooped/oss@7f5f9ee - Update branches for push event in build.yml devlooped/oss@5da103c - If the OSMF eula is present, switch to its license file devlooped/oss@4b84c54 - Consider either None or Content for OSMF license patching devlooped/oss@083a37b - Change file type from None to Content for osmfeula.txt devlooped/oss@fd03672 - Add Pack attribute to OSMFEULA content item devlooped/oss@dd13ed3 - Cap rate limit wait at 5 minutes, abort if longer devlooped/oss@61a602f
1 parent c06df6a commit fd3e5fb

File tree

10 files changed

+153
-35
lines changed

10 files changed

+153
-35
lines changed

.github/copilot-instructions.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# .NET Repository
2+
3+
**Always reference these instructions first and fallback to search or bash commands only when you encounter unexpected information that does not match the info here.**
4+
5+
## Working Effectively
6+
7+
### Essential Build Commands
8+
- **Restore dependencies**: `dotnet restore`
9+
10+
- **Build the entire solution**: `dotnet build`
11+
12+
- **Run tests**: `dnx --yes retest`
13+
- Runs all unit tests across the solution
14+
- If tests fail due to Azure Storage, run the following commands and retry: `npm install azurite` and `npx azurite &`
15+
16+
### Build Validation and CI Requirements
17+
- **Always run before committing**:
18+
* `dnx --yes retest`
19+
* `dotnet format whitespace -v:diag --exclude ~/.nuget`
20+
* `dotnet format style -v:diag --exclude ~/.nuget`
21+
22+
### Project Structure and Navigation
23+
24+
| Directory | Description |
25+
|-----------|-------------|
26+
| `src/` | Contains the repo source code. |
27+
| `bin/` | Contains built packages (if any) |
28+
29+
### Code Style and Formatting
30+
31+
#### EditorConfig Rules
32+
The repository uses `.editorconfig` at the repo root for consistent code style.
33+
34+
- **Indentation**: 4 spaces for C# files, 2 spaces for XML/YAML/JSON
35+
- **Line endings**: LF (Unix-style)
36+
- **Sort using directives**: System.* namespaces first (`dotnet_sort_system_directives_first = true`)
37+
- **Type references**: Prefer language keywords over framework type names (`int` vs `Int32`)
38+
- **Modern C# features**: Use object/collection initializers, coalesce expressions when possible, use var when the type is apparent from the right-hand side of the assignment
39+
- **Visibility modifiers**: only explicitly specify visibility when different from the default (e.g. `public` for classes, no `internal` for classes or `private` for fields, etc.)
40+
41+
#### Formatting Validation
42+
- CI enforces formatting with `dotnet format whitespace` and `dotnet format style`
43+
- Run locally: `dotnet format whitespace --verify-no-changes -v:diag --exclude ~/.nuget`
44+
- Fix formatting: `dotnet format` (without `--verify-no-changes`)
45+
46+
### Testing Practices
47+
48+
#### Test Framework
49+
- **xUnit** for all unit and integration tests
50+
- **Moq** for mocking dependencies
51+
- Located in `src/*.Tests/`
52+
53+
#### Test Attributes
54+
Custom xUnit attributes are sometimes used for conditional test execution:
55+
- `[SecretsFact("XAI_API_KEY")]` - Skips test if required secrets are missing from user secrets or environment variables
56+
- `[LocalFact("SECRET")]` - Runs only locally (skips in CI), requires specified secrets
57+
- `[CIFact]` - Runs only in CI environment
58+
59+
### Dependency Management
60+
61+
#### Adding Dependencies
62+
- Add to appropriate `.csproj` file
63+
- Run `dotnet restore` to update dependencies
64+
- Ensure version consistency across projects where applicable
65+
66+
#### CI/CD Pipeline
67+
- **Build workflow**: `.github/workflows/build.yml` - runs on PR and push to main/rel/feature branches
68+
- **Publish workflow**: Publishes to Sleet feed when `SLEET_CONNECTION` secret is available
69+
- **OS matrix**: Configured in `.github/workflows/os-matrix.json` (defaults to ubuntu-latest)
70+
71+
### Special Files and Tools
72+
73+
#### dnx Command
74+
- **Purpose**: built-in tool for running arbitrary dotnet tools that are published on nuget.org. `--yes` auto-confirms install before run.
75+
- **Example**: `dnx --yes retest` - runs tests with automatic retry on transient failures (retest being a tool package published at https://www.nuget.org/packages/retest)
76+
- **In CI**: `dnx --yes retest -- --no-build` (skips build, runs tests only)
77+
78+
#### Directory.Build.rsp
79+
- MSBuild response file with default build arguments
80+
- `-nr:false` - disables node reuse
81+
- `-m:1` - single-threaded build (for stability)
82+
- `-v:m` - minimal verbosity
83+
84+
#### Code Quality
85+
- All PRs must pass format validation
86+
- Tests must pass on all target frameworks
87+
- Follow existing patterns and conventions in the codebase
88+
89+
## Documenting Work
90+
91+
Project implemention details, design and key decisions should be documented in a top-level AGENTS.md file at the repo root.
92+
Keep this file updated whenever you make change significant changes for future reference.
93+
94+
User-facing features and APIs should be documented to highlight (not extensively, as an overview) key project features and capabilities, in the readme.md file at the repo root.

.github/workflows/build.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
- Release
1313
- Debug
1414
push:
15-
branches: [ main, dev, 'dev/*', 'feature/*', 'rel/*' ]
15+
branches: [ main, 'feature/*', 'rel/*' ]
1616
paths-ignore:
1717
- changelog.md
1818
- readme.md
@@ -72,9 +72,8 @@ jobs:
7272
run: dotnet build -m:1 -bl:build.binlog
7373

7474
- name: 🧪 test
75-
run: |
76-
dotnet tool update -g dotnet-retest
77-
dotnet retest -- --no-build
75+
shell: pwsh
76+
run: dnx --yes retest -- --no-build
7877

7978
- name: 🐛 logs
8079
uses: actions/upload-artifact@v4

.github/workflows/includes.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ jobs:
5050
((get-content -raw $file) -replace '\$product\$',$product).trim() | set-content $file
5151
5252
- name: ✍ pull request
53-
uses: peter-evans/create-pull-request@v6
53+
uses: peter-evans/create-pull-request@v8
5454
with:
5555
add-paths: |
5656
**.md
57-
osmfeula.txt
57+
*.txt
5858
base: main
5959
branch: markdown-includes
6060
delete-branch: true

.github/workflows/publish.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,8 @@ jobs:
3434
run: dotnet build -m:1 -bl:build.binlog
3535

3636
- name: 🧪 test
37-
run: |
38-
dotnet tool update -g dotnet-retest
39-
dotnet retest -- --no-build
37+
shell: pwsh
38+
run: dnx --yes retest -- --no-build
4039

4140
- name: 🐛 logs
4241
uses: actions/upload-artifact@v4

.github/workflows/triage.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@ jobs:
4949
# if we don't have at least 100 requests left, wait until reset
5050
if ($rate.remaining -lt 100) {
5151
$wait = ($rate.reset - (Get-Date (Get-Date).ToUniversalTime() -UFormat %s))
52-
echo "Rate limit remaining is $($rate.remaining), waiting for $($wait / 1000) seconds to reset"
52+
if ($wait -gt 300) {
53+
echo "Rate limit remaining is $($rate.remaining), reset in $wait seconds (more than 5'). Aborting."
54+
exit 1
55+
}
56+
echo "Rate limit remaining is $($rate.remaining), waiting $wait seconds to reset"
5357
sleep $wait
5458
$rate = gh api rate_limit | convertfrom-json | select -expandproperty rate
5559
echo "Rate limit has reset to $($rate.remaining) requests"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ BenchmarkDotNet.Artifacts
1212
.idea
1313
local.settings.json
1414
.env
15+
*.local
1516

1617
*.suo
1718
*.sdf

.netconfig

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@
3939
weak
4040
[file ".github/workflows/build.yml"]
4141
url = https://github.com/devlooped/oss/blob/main/.github/workflows/build.yml
42-
sha = 56c2b8532c2f86235a0f5bd00ba6eba126f199cf
42+
sha = 5da103cfbc1c4f9b5f59cfa698d2afbd744a7525
4343

44-
etag = bf99c19427f4372ecfe38ec56aa8c411058684fb717da5661f17ac00388b3602
44+
etag = 851af098748f7cfa5bc3cfd4cc404a6de930532b59ceb2b3b535282c41226f3a
4545
weak
4646
[file ".github/workflows/changelog.yml"]
4747
url = https://github.com/devlooped/oss/blob/main/.github/workflows/changelog.yml
@@ -57,21 +57,21 @@
5757
weak
5858
[file ".github/workflows/includes.yml"]
5959
url = https://github.com/devlooped/oss/blob/main/.github/workflows/includes.yml
60-
sha = 2d1fb4ed52b63689f2b20b994512ebac28721243
60+
sha = 06628725a6303bb8c4cf3076a384fc982a91bc0b
6161

62-
etag = 34ade86f020dea717c6a27ad7dcd0069c35be2832c58b0ba961278a1efe34089
62+
etag = 478f91d4126230e57cc601382da1ba23f9daa054645b4af89800d8dd862e64fd
6363
weak
6464
[file ".github/workflows/publish.yml"]
6565
url = https://github.com/devlooped/oss/blob/main/.github/workflows/publish.yml
66-
sha = 56c2b8532c2f86235a0f5bd00ba6eba126f199cf
66+
sha = 7f5f9ee9f362f7e8f951d618f8f799033550e687
6767

68-
etag = 2ef43521627aa3a91dd55bdc2856ec0c6a93b42485d4fe9d6b181f9ee42c8e18
68+
etag = c60411d1aa4e98e7f69e2d34cbccb8eb7e387ec11f6f8e78ee8d8b92122d7025
6969
weak
7070
[file ".gitignore"]
7171
url = https://github.com/devlooped/oss/blob/main/.gitignore
72-
sha = 3776526342afb3f57da7e80f2095e5fdca3c31c9
72+
sha = a225b7a9f609f26bcc24e0d84f663387be251a7d
7373

74-
etag = 11767f73556aa4c6c8bcc153b77ee8e8114f99fa3b885b0a7d66d082f91e77b3
74+
etag = 20a8b49d57024abbd85aac5b0020c30e5eb68e0384b2761e93727c8780c4a991
7575
weak
7676
[file "Directory.Build.rsp"]
7777
url = https://github.com/devlooped/oss/blob/main/Directory.Build.rsp
@@ -96,15 +96,15 @@
9696
weak
9797
[file "src/Directory.Build.props"]
9898
url = https://github.com/devlooped/oss/blob/main/src/Directory.Build.props
99-
sha = 0ff8b7b79a82112678326d1dc5543ed890311366
99+
sha = dd13ed3334135c30dcb1e3b2295dc7622de298d9
100100

101-
etag = 3ebde0a8630d526b80f15801179116e17a857ff880a4442e7db7b075efa4fd63
101+
etag = bd05f9f240823c0ac79ddfefe654061550c36f82dd94fa513b82900e92686a5f
102102
weak
103103
[file "src/Directory.Build.targets"]
104104
url = https://github.com/devlooped/oss/blob/main/src/Directory.Build.targets
105-
sha = 4339749ef4b8f66def75931df09ef99c149f8421
105+
sha = 083a37bd9307ec820bac6ee3c7384083151d36d8
106106

107-
etag = 8b4492765755c030c4c351e058a92f53ab493cab440c1c0ef431f6635c4dae0e
107+
etag = 907682e5632a2ba430357e6e042a4ca33cb8c94a3a215d3091aa03f5958a4877
108108
weak
109109
[file "src/kzu.snk"]
110110
url = https://github.com/devlooped/oss/blob/main/src/kzu.snk
@@ -130,9 +130,9 @@
130130
weak
131131
[file ".github/workflows/triage.yml"]
132132
url = https://github.com/devlooped/oss/blob/main/.github/workflows/triage.yml
133-
sha = 33000c0c4ab4eb4e0e142fa54515b811a189d55c
133+
sha = 61a602fc61eedbdae235f01e93657a6219ac2427
134134

135-
etag = 013a47739e348f06891f37c45164478cca149854e6cd5c5158e6f073f852b61a
135+
etag = 152cd3a559c08da14d1da12a5262ba1d2e0ed6bed6d2eabf5bd209b0c35d8a75
136136
weak
137137
[file ".github/workflows/dotnet-file-core.yml"]
138138
url = https://github.com/devlooped/oss/blob/main/.github/workflows/dotnet-file-core.yml
@@ -160,3 +160,14 @@
160160
etag = 5d3c3772b11e579ae9cbde8731ff3f9bbd97c166f7b159e03530a3ac8bd8c0bf
161161
weak
162162
sha = 04f82bd24a0c01503e33d3fe45d6de1935e0d2eb
163+
[file "readme.tmp.md"]
164+
url = https://github.com/devlooped/oss/blob/main/readme.tmp.md
165+
skip
166+
[file "oss.cs"]
167+
url = https://github.com/devlooped/oss/blob/main/oss.cs
168+
skip
169+
[file ".github/copilot-instructions.md"]
170+
url = https://github.com/devlooped/oss/blob/main/.github/copilot-instructions.md
171+
sha = e616d89d9537c4b8ccf1c20dd277ab82104167c4
172+
etag = 6ee650d118a57494d3545d54718ccaa5257b09d54504e9c21514fe596edd9678
173+
weak

readme.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -339,36 +339,32 @@ The versioning scheme for packages is:
339339
<!-- sponsors.md -->
340340
[![Clarius Org](https://avatars.githubusercontent.com/u/71888636?v=4&s=39 "Clarius Org")](https://github.com/clarius)
341341
[![MFB Technologies, Inc.](https://avatars.githubusercontent.com/u/87181630?v=4&s=39 "MFB Technologies, Inc.")](https://github.com/MFB-Technologies-Inc)
342+
[![Khamza Davletov](https://avatars.githubusercontent.com/u/13615108?u=11b0038e255cdf9d1940fbb9ae9d1d57115697ab&v=4&s=39 "Khamza Davletov")](https://github.com/khamza85)
342343
[![SandRock](https://avatars.githubusercontent.com/u/321868?u=99e50a714276c43ae820632f1da88cb71632ec97&v=4&s=39 "SandRock")](https://github.com/sandrock)
343344
[![DRIVE.NET, Inc.](https://avatars.githubusercontent.com/u/15047123?v=4&s=39 "DRIVE.NET, Inc.")](https://github.com/drivenet)
344345
[![Keith Pickford](https://avatars.githubusercontent.com/u/16598898?u=64416b80caf7092a885f60bb31612270bffc9598&v=4&s=39 "Keith Pickford")](https://github.com/Keflon)
345346
[![Thomas Bolon](https://avatars.githubusercontent.com/u/127185?u=7f50babfc888675e37feb80851a4e9708f573386&v=4&s=39 "Thomas Bolon")](https://github.com/tbolon)
346347
[![Kori Francis](https://avatars.githubusercontent.com/u/67574?u=3991fb983e1c399edf39aebc00a9f9cd425703bd&v=4&s=39 "Kori Francis")](https://github.com/kfrancis)
347-
[![Uno Platform](https://avatars.githubusercontent.com/u/52228309?v=4&s=39 "Uno Platform")](https://github.com/unoplatform)
348348
[![Reuben Swartz](https://avatars.githubusercontent.com/u/724704?u=2076fe336f9f6ad678009f1595cbea434b0c5a41&v=4&s=39 "Reuben Swartz")](https://github.com/rbnswartz)
349349
[![Jacob Foshee](https://avatars.githubusercontent.com/u/480334?v=4&s=39 "Jacob Foshee")](https://github.com/jfoshee)
350350
[![](https://avatars.githubusercontent.com/u/33566379?u=bf62e2b46435a267fa246a64537870fd2449410f&v=4&s=39 "")](https://github.com/Mrxx99)
351351
[![Eric Johnson](https://avatars.githubusercontent.com/u/26369281?u=41b560c2bc493149b32d384b960e0948c78767ab&v=4&s=39 "Eric Johnson")](https://github.com/eajhnsn1)
352-
[![David JENNI](https://avatars.githubusercontent.com/u/3200210?v=4&s=39 "David JENNI")](https://github.com/davidjenni)
353352
[![Jonathan ](https://avatars.githubusercontent.com/u/5510103?u=98dcfbef3f32de629d30f1f418a095bf09e14891&v=4&s=39 "Jonathan ")](https://github.com/Jonathan-Hickey)
354-
[![Charley Wu](https://avatars.githubusercontent.com/u/574719?u=ea7c743490c83e8e4b36af76000f2c71f75d636e&v=4&s=39 "Charley Wu")](https://github.com/akunzai)
355353
[![Ken Bonny](https://avatars.githubusercontent.com/u/6417376?u=569af445b6f387917029ffb5129e9cf9f6f68421&v=4&s=39 "Ken Bonny")](https://github.com/KenBonny)
356354
[![Simon Cropp](https://avatars.githubusercontent.com/u/122666?v=4&s=39 "Simon Cropp")](https://github.com/SimonCropp)
357355
[![agileworks-eu](https://avatars.githubusercontent.com/u/5989304?v=4&s=39 "agileworks-eu")](https://github.com/agileworks-eu)
358356
[![Zheyu Shen](https://avatars.githubusercontent.com/u/4067473?v=4&s=39 "Zheyu Shen")](https://github.com/arsdragonfly)
359357
[![Vezel](https://avatars.githubusercontent.com/u/87844133?v=4&s=39 "Vezel")](https://github.com/vezel-dev)
360358
[![ChilliCream](https://avatars.githubusercontent.com/u/16239022?v=4&s=39 "ChilliCream")](https://github.com/ChilliCream)
361359
[![4OTC](https://avatars.githubusercontent.com/u/68428092?v=4&s=39 "4OTC")](https://github.com/4OTC)
362-
[![Vincent Limo](https://avatars.githubusercontent.com/devlooped-user?s=39 "Vincent Limo")](https://github.com/v-limo)
363360
[![domischell](https://avatars.githubusercontent.com/u/66068846?u=0a5c5e2e7d90f15ea657bc660f175605935c5bea&v=4&s=39 "domischell")](https://github.com/DominicSchell)
364-
[![Justin Wendlandt](https://avatars.githubusercontent.com/u/1068431?u=f7715ed6a8bf926d96ec286f0f1c65f94bf86928&v=4&s=39 "Justin Wendlandt")](https://github.com/jwendl)
365361
[![Adrian Alonso](https://avatars.githubusercontent.com/u/2027083?u=129cf516d99f5cb2fd0f4a0787a069f3446b7522&v=4&s=39 "Adrian Alonso")](https://github.com/adalon)
366-
[![Michael Hagedorn](https://avatars.githubusercontent.com/u/61711586?u=8f653dfcb641e8c18cc5f78692ebc6bb3a0c92be&v=4&s=39 "Michael Hagedorn")](https://github.com/Eule02)
367-
[![](https://avatars.githubusercontent.com/devlooped-user?s=39 "")](https://github.com/henkmartijn)
368362
[![torutek](https://avatars.githubusercontent.com/u/33917059?v=4&s=39 "torutek")](https://github.com/torutek)
369-
[![mccaffers](https://avatars.githubusercontent.com/u/16667079?u=739e110e62a75870c981640447efa5eb2cb3bc8f&v=4&s=39 "mccaffers")](https://github.com/mccaffers)
370-
[![Christoph Hochstätter](https://avatars.githubusercontent.com/u/17645550?u=01bbdcb84d03cac26260f1c951e046d24a324591&v=4&s=39 "Christoph Hochstätter")](https://github.com/christoh)
371-
[![ADS Fund](https://avatars.githubusercontent.com/u/202042116?v=4&s=39 "ADS Fund")](https://github.com/ADS-Fund)
363+
[![mccaffers](https://avatars.githubusercontent.com/u/16667079?u=110034edf51097a5ee82cb6a94ae5483568e3469&v=4&s=39 "mccaffers")](https://github.com/mccaffers)
364+
[![Seika Logiciel](https://avatars.githubusercontent.com/u/2564602?v=4&s=39 "Seika Logiciel")](https://github.com/SeikaLogiciel)
365+
[![Andrew Grant](https://avatars.githubusercontent.com/devlooped-user?s=39 "Andrew Grant")](https://github.com/wizardness)
366+
[![Lars](https://avatars.githubusercontent.com/u/1727124?v=4&s=39 "Lars")](https://github.com/latonz)
367+
[![prime167](https://avatars.githubusercontent.com/u/3722845?v=4&s=39 "prime167")](https://github.com/prime167)
372368
373369

374370
<!-- sponsors.md -->

src/Directory.Build.props

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@
166166
<Using Include="System.ArgumentNullException" Static="true" />
167167
</ItemGroup>
168168

169+
<ItemGroup Label="OSMF" Condition="Exists('$(MSBuildThisFileDirectory)..\osmfeula.txt')">
170+
<Content Include="$(MSBuildThisFileDirectory)..\osmfeula.txt" Link="osmfeula.txt" Pack="true" PackagePath="OSMFEULA.txt" />
171+
</ItemGroup>
172+
169173
<Import Project="Directory.props" Condition="Exists('Directory.props')"/>
170174
<Import Project="Directory.props.user" Condition="Exists('Directory.props.user')" />
171175

src/Directory.Build.targets

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@
174174

175175
<Target Name="UpdatePackageMetadata"
176176
BeforeTargets="PrepareForBuild;GenerateMSBuildEditorConfigFileShouldRun;GetAssemblyVersion;GetPackageMetadata;GenerateNuspec;Pack"
177-
DependsOnTargets="EnsureProjectInformation"
177+
DependsOnTargets="EnsureProjectInformation;UpdatePackageLicense"
178178
Condition="'$(SourceControlInformationFeatureSupported)' == 'true' And
179179
'$(IsPackable)' == 'true'">
180180
<PropertyGroup>
@@ -184,6 +184,16 @@
184184
</PropertyGroup>
185185
</Target>
186186

187+
<Target Name="UpdatePackageLicense">
188+
<!-- If project has a None/Content item with PackagePath=OSMFEULA.txt -->
189+
<PropertyGroup Condition="@(None -> WithMetadataValue('PackagePath', 'OSMFEULA.txt')) != '' or @(Content -> WithMetadataValue('PackagePath', 'OSMFEULA.txt')) != ''">
190+
<PackageLicenseExpression></PackageLicenseExpression>
191+
<PackageLicenseFile>OSMFEULA.txt</PackageLicenseFile>
192+
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
193+
</PropertyGroup>
194+
</Target>
195+
196+
187197
<!-- Import before UsingTask because first to declare tasks wins -->
188198
<Import Project="Directory.targets" Condition="Exists('Directory.targets')"/>
189199
<Import Project="Directory.targets.user" Condition="Exists('Directory.targets.user')" />

0 commit comments

Comments
 (0)