Skip to content

Commit db29e13

Browse files
authored
Merge branch 'main' into merge/release/10.0.2xx-to-main
2 parents 869251f + bb4aee4 commit db29e13

File tree

246 files changed

+10974
-2100
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

246 files changed

+10974
-2100
lines changed

.azuredevops/dependabot.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
version: 2
2+
3+
# Disabling dependabot on Azure DevOps as this is a mirrored repo. Updates should go through github.
4+
enable-campaigned-updates: false
5+
enable-security-updates: false

.editorconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,10 @@ dotnet_diagnostic.IDE0200.severity = none
280280
dotnet_diagnostic.IDE0240.severity = warning
281281

282282
# Additional rules for template engine source code
283+
284+
# Default severity for analyzer diagnostics with category 'StyleCop.CSharp.SpacingRules'
285+
dotnet_analyzer_diagnostic.category-StyleCop.CSharp.SpacingRules.severity = none
286+
283287
[{src,test}/**{Microsoft.TemplateEngine.*,dotnet-new?*}/**.cs]
284288
# Default analyzed API surface = 'public' (public APIs)
285289
dotnet_code_quality.api_surface = public

.github/workflows/add-lockdown-label.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ name: Add Branch Lockdown Label to PRs
33
on:
44
pull_request_target:
55
workflow_dispatch: # Allows manual triggering of the workflow
6+
branches:
7+
- 'release/8.*'
8+
- 'release/9.*'
9+
- 'release/10.*'
10+
- 'main'
611

712
permissions:
813
actions: write # For managing the operation state cache
@@ -11,6 +16,8 @@ permissions:
1116
jobs:
1217
add-label:
1318
runs-on: ubuntu-latest
19+
# Only run on the main repository, not forks
20+
if: github.repository == 'dotnet/sdk'
1421

1522
permissions:
1623
contents: read
@@ -19,6 +26,8 @@ jobs:
1926
steps:
2027
- name: Checkout repository
2128
uses: actions/checkout@v2
29+
with:
30+
persist-credentials: false
2231

2332
- name: Install jq
2433
run: sudo apt-get install -y jq

.github/workflows/copilot-setup-steps.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ jobs:
2020
runs-on: ubuntu-latest
2121
steps:
2222
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
23+
with:
24+
persist-credentials: false
2325
- name: Do an initial build to ensure all dependencies are restored
2426
continue-on-error: true
2527
run: |
@@ -31,3 +33,18 @@ jobs:
3133
- name: Check dotnet version
3234
run: |
3335
dotnet --version
36+
37+
# For MCP servers like nuget's
38+
- name: Install .NET 10.x
39+
uses: actions/setup-dotnet@v4
40+
with:
41+
dotnet-version: |
42+
10.x
43+
dotnet-quality: preview
44+
45+
# for MCP servers
46+
- name: Install .NET 8.x
47+
uses: actions/setup-dotnet@v4
48+
with:
49+
dotnet-version: |
50+
8.x

.github/workflows/remove-lockdown-label.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,20 @@ name: Remove Lockdown Label from PRs
22

33
on:
44
pull_request_target:
5-
types: [closed]
5+
branches:
6+
- 'release/8.*'
7+
- 'release/9.*'
8+
- 'release/10.*'
9+
- 'main'
610

711
permissions:
812
actions: write
913
pull-requests: write
1014

1115
jobs:
1216
remove-labels:
13-
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'Branding')
17+
# Only run on the main repository, not forks
18+
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'Branding') && github.repository == 'dotnet/sdk'
1419
runs-on: ubuntu-latest
1520
steps:
1621
- name: PR's only change is <VersionFeature> in eng/Versions.props

.github/workflows/stale.yml

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,10 @@ on:
33
schedule:
44
- cron: '19 4,16 * * *' # Twice daily at 19 minutes after the hour (random/uncommon time)
55

6-
workflow_dispatch:
7-
# Manual triggering through the GitHub UI, API, or CLI
8-
inputs:
9-
daysBeforeStale:
10-
required: true
11-
default: "1827"
12-
daysBeforeClose:
13-
required: true
14-
default: "30"
15-
operationsPerRun:
16-
required: true
17-
default: "4000"
18-
196
permissions:
207
actions: write # For managing the operation state cache
218
issues: write
9+
pull-requests: write
2210

2311
jobs:
2412
stale:
@@ -29,11 +17,10 @@ jobs:
2917
- uses: actions/stale@v9 # https://github.com/actions/stale/blob/v9/README.md
3018
with:
3119
ascending: true # Process the oldest issues first
32-
stale-issue-label: 'stale'
33-
stale-issue-message: "Due to lack of recent activity, this issue has been labeled as 'stale'. It will be closed if no further activity occurs within 30 more days. Any new comment will remove the label."
34-
close-issue-message: "This issue will now be closed since it has been labeled 'stale' without activity for 30 days."
35-
days-before-stale: ${{ fromJson(inputs.daysBeforeStale || 2192) }} # Default to 6 years if not specified as input
36-
days-before-close: ${{ fromJson(inputs.daysBeforeClose || 30 ) }} # Default to 30 days if not specified as input
37-
days-before-pr-stale: -1 # Do not label PRs as 'stale'
38-
days-before-pr-close: -1 # Do not close PRs labeled as 'stale'
39-
operations-per-run: ${{ fromJson(inputs.operationsPerRun || 4000 )}}
20+
stale-issue-message: "Due to lack of recent activity, this issue has been labeled as 'Stale'. It will be closed if no further activity occurs within 30 more days. Any new comment will remove the label."
21+
stale-pr-message: "Due to lack of recent activity, this PR has been labeled as 'Stale'. It will be closed if no further activity occurs within 7 more days. Any new comment will remove the label."
22+
days-before-issue-stale: 1827 # ~5 years
23+
days-before-issue-close: 30
24+
days-before-pr-stale: 180 # 6 months
25+
days-before-pr-close: 7
26+
operations-per-run: 4000

.github/workflows/update-man-pages.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: Update man-pages workflow
22
on:
3+
workflow_dispatch:
34
schedule:
45
- cron: "42 3 1/15 * *" # Trigger every 15 days at 03:42
56
#- cron: "0,5,10,15,20,25,30,35,40,45,50,55 * * * *" # For testing
@@ -14,6 +15,9 @@ jobs:
1415
steps:
1516
- name: Checkout repository code
1617
uses: actions/checkout@v4
18+
with:
19+
ref: release/10.0.1xx
20+
persist-credentials: false
1721

1822
- name: Update man-pages
1923
run: |
@@ -38,7 +42,7 @@ jobs:
3842
git checkout -b $branch
3943
git commit -m "$title"
4044
git push -u origin $branch --force
41-
gh pr create --base main --head $branch --title "$title" --body "$body"
45+
gh pr create --base release/10.0.1xx --head $branch --title "$title" --body "$body"
4246
fi
4347
env:
4448
GH_TOKEN: ${{ github.token }}
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
name: Update Static Web Assets Baselines
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
pr_number:
7+
description: 'Pull Request number'
8+
required: true
9+
type: string
10+
11+
jobs:
12+
update-baselines:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
16+
pull-requests: write
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
with:
22+
token: ${{ secrets.GITHUB_TOKEN }}
23+
fetch-depth: 0
24+
25+
- name: Checkout PR branch
26+
run: |
27+
gh pr checkout ${GITHUB_EVENT_INPUTS_PR_NUMBER}
28+
env:
29+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
GITHUB_EVENT_INPUTS_PR_NUMBER: ${{ github.event.inputs.pr_number }}
31+
32+
- name: Run build script
33+
id: build
34+
run: |
35+
chmod +x ./build.sh
36+
./build.sh -c Release
37+
continue-on-error: true
38+
39+
- name: Update baselines
40+
id: update
41+
if: steps.build.outcome == 'success'
42+
run: |
43+
# Set DOTNET_ROOT to the local dotnet installation
44+
export DOTNET_ROOT="$(pwd)/.dotnet"
45+
# Prepend DOTNET_ROOT to PATH
46+
export PATH="$DOTNET_ROOT:$PATH"
47+
48+
# Run the update baselines script
49+
chmod +x src/RazorSdk/update-test-baselines.sh
50+
src/RazorSdk/update-test-baselines.sh
51+
continue-on-error: true
52+
53+
- name: Check for changes
54+
id: check-changes
55+
if: steps.update.outcome == 'success'
56+
run: |
57+
# Check if there are changes to any *.json files under the test folder
58+
if git diff --name-only | grep -E '^test/.*\.json$'; then
59+
echo "changes=true" >> $GITHUB_OUTPUT
60+
else
61+
echo "changes=false" >> $GITHUB_OUTPUT
62+
fi
63+
64+
- name: Commit and push changes
65+
id: commit
66+
if: steps.update.outcome == 'success' && steps.check-changes.outputs.changes == 'true'
67+
run: |
68+
git config --global user.name 'github-actions[bot]'
69+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
70+
71+
# Create commit with formatted date
72+
COMMIT_DATE=$(date -u +"%Y-%m-%d")
73+
git add test/**/*.json
74+
git commit -m "[Infrastructure] Update baselines $COMMIT_DATE"
75+
76+
# Push to the PR branch
77+
git push
78+
continue-on-error: true
79+
80+
- name: Comment on PR - No changes
81+
if: steps.update.outcome == 'success' && steps.check-changes.outputs.changes == 'false'
82+
run: |
83+
gh pr comment ${GITHUB_EVENT_INPUTS_PR_NUMBER} \
84+
--body "No baselines were updated."
85+
env:
86+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
87+
GITHUB_EVENT_INPUTS_PR_NUMBER: ${{ github.event.inputs.pr_number }}
88+
89+
- name: Comment on PR - Changes pushed
90+
if: steps.commit.outcome == 'success'
91+
run: |
92+
gh pr comment ${GITHUB_EVENT_INPUTS_PR_NUMBER} \
93+
--body "Baselines updated."
94+
env:
95+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
96+
GITHUB_EVENT_INPUTS_PR_NUMBER: ${{ github.event.inputs.pr_number }}
97+
98+
- name: Comment on PR - Failure
99+
if: steps.build.outcome == 'failure' || steps.update.outcome == 'failure' || (steps.check-changes.outputs.changes == 'true' && steps.commit.outcome == 'failure')
100+
run: |
101+
ERROR_MSG="Update baselines failed"
102+
103+
if [[ "${STEPS_BUILD_OUTCOME}" == "failure" ]]; then
104+
ERROR_MSG="$ERROR_MSG: Build script failed"
105+
elif [[ "${STEPS_UPDATE_OUTCOME}" == "failure" ]]; then
106+
ERROR_MSG="$ERROR_MSG: Update baselines script failed"
107+
elif [[ "${STEPS_COMMIT_OUTCOME}" == "failure" ]]; then
108+
ERROR_MSG="$ERROR_MSG: Failed to commit or push changes"
109+
fi
110+
111+
gh pr comment ${GITHUB_EVENT_INPUTS_PR_NUMBER} \
112+
--body "$ERROR_MSG"
113+
env:
114+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
115+
STEPS_BUILD_OUTCOME: ${{ steps.build.outcome }}
116+
STEPS_UPDATE_OUTCOME: ${{ steps.update.outcome }}
117+
STEPS_COMMIT_OUTCOME: ${{ steps.commit.outcome }}
118+
GITHUB_EVENT_INPUTS_PR_NUMBER: ${{ github.event.inputs.pr_number }}

.vsts-ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ extends:
299299
publishUsingPipelines: true
300300
publishAssetsImmediately: true
301301
isAssetlessBuild: true
302+
repositoryAlias: self
302303
pool:
303304
name: $(DncEngInternalBuildPool)
304305
image: 1es-windows-2022

CODEOWNERS

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# This is a comment.
22
# Each line is a file pattern followed by one or more owners.
3+
# Syntax: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#codeowners-syntax
34

45
# These owners will be the default owners for everything in
56
# the repo. Unless a later match takes precedence,
@@ -30,7 +31,7 @@
3031
/src/WasmSdk @lewing @akoeplinger @pavelsavara @maraf
3132

3233
# Area-Format
33-
/src/Cli/dotnet/commands/dotnet-format @phil-allen-msft
34+
/src/Cli/dotnet/Commands/Format @phil-allen-msft
3435
/test/dotnet-format.UnitTests @phil-allen-msft
3536

3637
# Area-NuGet
@@ -46,21 +47,21 @@
4647
/test/dotnet.Tests/CommandTests/Restore @dotnet/nuget-team
4748

4849
# Area-FSharp
49-
/src/Cli/dotnet/commands/dotnet-fsi @dotnet/fsharp
50+
/src/Cli/dotnet/Commands/Fsi @dotnet/fsharp
5051
/test/dotnet-fsi.Tests @dotnet/fsharp
5152

5253
# Area-DotNet Test
53-
/src/Cli/dotnet/commands/dotnet-test @dotnet/dotnet-testing-admin
54-
/src/Cli/dotnet/commands/dotnet-vstest @dotnet/dotnet-testing-admin
55-
/test/dotnet-test.Tests @dotnet/dotnet-testing-admin
56-
/test/dotnet-vstest.Tests @dotnet/dotnet-testing-admin
54+
/src/Cli/dotnet/Commands/Test @dotnet/dotnet-testing-admin
55+
/src/Cli/dotnet/Commands/VSTest @dotnet/dotnet-testing-admin
56+
/test/dotnet.Tests/CommandTests/Test @dotnet/dotnet-testing-admin
57+
/test/dotnet.Tests/CommandTests/VSTest @dotnet/dotnet-testing-admin
5758
/test/dotnet-new.IntegrationTests @dotnet/dotnet-testing-admin
5859
/template_feed/Microsoft.DotNet.Common.*/content/MSTest* @dotnet/dotnet-testing-admin
5960
/template_feed/Microsoft.DotNet.Common.*/content/NUnit* @dotnet/dotnet-testing-admin
6061
/template_feed/Microsoft.DotNet.Common.*/content/XUnit* @dotnet/dotnet-testing-admin
6162

6263
# Area-Templates
63-
/src/Cli/dotnet/commands/dotnet-new @dotnet/templating-engine-maintainers
64+
/src/Cli/dotnet/Commands/New @dotnet/templating-engine-maintainers
6465
/src/Cli/Microsoft.TemplateEngine.Cli @dotnet/templating-engine-maintainers
6566
/test/dotnet-new.IntegrationTests @dotnet/templating-engine-maintainers
6667
/test/Microsoft.TemplateEngine.* @dotnet/templating-engine-maintainers
@@ -100,14 +101,20 @@
100101
/test/Microsoft.DotNet.GenAPI/ @dotnet/area-infrastructure-libraries
101102
/test/Microsoft.DotNet.ApiSymbolExtensions.Tests/ @dotnet/area-infrastructure-libraries
102103

103-
# Area: dotnet containers
104+
# Area-Containers
104105
/src/Cli/Containers @dotnet/sdk-container-builds-maintainers
105106
/test/containerize.UnitTests @dotnet/sdk-container-builds-maintainers
106107
/test/Microsoft.NET.Build.Containers.IntegrationTests @dotnet/sdk-container-builds-maintainers
107108
/test/Microsoft.NET.Build.Containers.UnitTests @dotnet/sdk-container-builds-maintainers
108109

109-
# dotnet-format
110+
# Area-Format
110111
/src/BuiltInTools/dotnet-format @dotnet/roslyn-ide
111112
/test/dotnet-format.UnitTests @dotnet/roslyn-ide
112113

114+
# Area-Microsoft.CodeAnalysis.NetAnalyzers
113115
/src/Microsoft.CodeAnalysis.NetAnalyzers @dotnet/dotnet-analyzers
116+
117+
# Area-Infrastructure
118+
.vsts-ci.yml @MiYanni
119+
.vsts-pr.yml @MiYanni
120+
/eng/pipelines @MiYanni

0 commit comments

Comments
 (0)