Skip to content

Commit db3bc23

Browse files
committed
Merge branch 'main' of https://github.com/dotnet/sdk into merge/release/9.0.3xx-to-main
2 parents 106a305 + 2fe5eab commit db3bc23

File tree

5,271 files changed

+236525
-182391
lines changed

Some content is hidden

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

5,271 files changed

+236525
-182391
lines changed

.config/dotnet-tools.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"microsoft.dotnet.darc": {
6-
"version": "1.1.0-beta.24367.3",
6+
"version": "1.1.0-beta.25216.3",
77
"commands": [
88
"darc"
99
]

.config/tsaoptions.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"instanceUrl": "https://devdiv.visualstudio.com/",
3+
"template": "TFSDEVDIV",
4+
"projectName": "DEVDIV",
5+
"areaPath": "DevDiv\\NET Tools\\SDK",
6+
"iterationPath": "DevDiv",
7+
"notificationAliases": [ "[email protected]" ],
8+
"repositoryName": "dotnet-sdk",
9+
"codebaseName": "dotnet-sdk"
10+
}

.devcontainer/devcontainer.json

+5
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
]
1212
}
1313
},
14+
"features": {
15+
"ghcr.io/devcontainers/features/sshd:1": {
16+
"version": "latest"
17+
}
18+
},
1419
// Use 'postCreateCommand' to run commands after the container is created.
1520
"postCreateCommand": "bash -i ${containerWorkspaceFolder}/.devcontainer/scripts/post-creation.sh",
1621
// Add the locally installed dotnet to the path to ensure that it is activated

.devcontainer/vmr/devcontainer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// The container supports source-building the SDK
44
{
55
"name": "VMR with PR changes",
6-
"image": "mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-39",
6+
"image": "mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9",
77
"hostRequirements": {
88
// A completely source built .NET is >64 GB with all the repos/artifacts
99
"storage": "128gb"

.devcontainer/vmr/init.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ vmr_branch=$(git -C "$sdk_dir" log --pretty=format:'%D' HEAD^ \
2525
| sed 's@origin/@@' \
2626
| sed 's@,.*@@')
2727

28-
"$workspace_dir/synchronize-vmr.sh" --branch "$vmr_branch" --debug
28+
"$workspace_dir/synchronize-vmr.sh" --branch "$vmr_branch" --ci --debug
2929

30-
(cd "$vmr_dir" && ./prep-source-build.sh)
30+
cd "$vmr_dir"

.editorconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ dotnet_diagnostic.SA1601.severity = none
456456
dotnet_diagnostic.SA1633.severity = none
457457

458458
# Additional rules for test source code for template engine
459-
[test/{Microsoft.TemplateEngine.*,dotnet-new.Tests}/**.cs]
459+
[test/{Microsoft.TemplateEngine.*,dotnet-new.IntegrationTests}/**.cs]
460460
# Test methods should not be skipped
461461
dotnet_diagnostic.xUnit1004.severity = warning
462462
# Elements should appear in the correct order

.gitattributes

+8
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
###############################################################################
1111
*.xlf linguist-generated=true
1212

13+
###############################################################################
14+
# Set default behavior to:
15+
# don't collapse these files in PRs
16+
###############################################################################
17+
**/build/** linguist-generated=false
18+
1319
###############################################################################
1420
# Set file behavior to:
1521
# treat as text
@@ -61,3 +67,5 @@
6167
*.verified.txt text eol=lf working-tree-encoding=UTF-8
6268
*.verified.xml text eol=lf working-tree-encoding=UTF-8
6369
*.verified.json text eol=lf working-tree-encoding=UTF-8
70+
71+
src/SourceBuild/patches/**/*.patch text eol=lf

.github/copilot-instructions.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Coding Style and Changes:
2+
- Code should match the style of the file it's in.
3+
- Changes should be minimal to resolve a problem in a clean way.
4+
- User-visible changes to behavior should be considered carefully before committing. They should always be flagged.
5+
6+
Testing:
7+
- Large changes should always include test changes.
8+
- The Skip parameter of the Fact attribute to point to the specific issue link.
9+
10+
Output Considerations:
11+
- When considering how output should look, solicit advice from baronfel.
12+
13+
Localization:
14+
- Avoid modifying .xlf files and instead prompt the user to update them using the `/t:UpdateXlf` target on MSBuild.
15+
- Consider localizing strings in .resx files when possible.
+107-115
Original file line numberDiff line numberDiff line change
@@ -1,115 +1,107 @@
1-
id:
2-
name: GitOps.PullRequestIssueManagement
3-
description: GitOps.PullRequestIssueManagement primitive
4-
owner:
5-
resource: repository
6-
disabled: false
7-
where:
8-
configuration:
9-
resourceManagementConfiguration:
10-
scheduledSearches:
11-
- description: Auto close "Area-NuGet" issues and add a comment pointing to NuGet repo
12-
frequencies:
13-
- daily:
14-
time: 16:0
15-
filters:
16-
- isIssue
17-
- isOpen
18-
- hasLabel:
19-
label: Area-NuGet
20-
actions:
21-
- addReply:
22-
reply: >-
23-
Thanks for creating this issue! We believe this issue is related to NuGet tooling, which is maintained by the NuGet team. Thus, we closed this one and encourage you to raise this issue in the [NuGet repository](https://github.com/NuGet/Home) instead. Don’t forget to check out [NuGet’s contributing guide](https://github.com/NuGet/Home/blob/dev/CONTRIBUTING.md#before-submitting-an-issue) before submitting an issue!
24-
25-
26-
If you believe this issue was closed out of error, please comment to let us know.
27-
28-
29-
Happy Coding!
30-
- closeIssue
31-
eventResponderTasks:
32-
- if:
33-
- payloadType: Pull_Request
34-
- hasLabel:
35-
label: Auto-Merge If Tests Pass
36-
then:
37-
- enableAutoMerge:
38-
mergeMethod: Squash
39-
description: Automatically merge pull requests
40-
- if:
41-
- payloadType: Pull_Request
42-
- labelRemoved:
43-
label: Auto-Merge If Tests Pass
44-
then:
45-
- disableAutoMerge
46-
description: Automatically merge pull requests
47-
- if:
48-
- payloadType: Issues
49-
- labelAdded:
50-
label: Area-ApiCompat
51-
then:
52-
- addReply:
53-
reply: '@dotnet/area-infrastructure-libraries a new issue has been filed in the ApiCompat area, please triage'
54-
description: Notify apicompat of new untriaged bugs
55-
- if:
56-
- payloadType: Issues
57-
- labelAdded:
58-
label: Area-ILLink
59-
then:
60-
- addReply:
61-
reply: '@dotnet/illink a new issue has been filed in the ILLink area, please triage'
62-
description: Notify linker of new untriaged bugs
63-
- if:
64-
- payloadType: Pull_Request
65-
- labelAdded:
66-
label: Area-AspNetCore
67-
- isOpen
68-
then:
69-
- addReply:
70-
reply: >-
71-
Thanks for your PR, @${issueAuthor}.
72-
73-
To learn about the PR process and branching schedule of this repo, please take a look at the [SDK PR Guide](https://github.com/dotnet/sdk/blob/main/documentation/project-docs/SDK-PR-guide.md).
74-
description: Remind ASP.NET Core PR authors the process to follow
75-
- if:
76-
- payloadType: Issues
77-
- labelAdded:
78-
label: breaking-change
79-
then:
80-
- addLabel:
81-
label: needs-breaking-change-doc-created
82-
- addReply:
83-
reply: >-
84-
Added `needs-breaking-change-doc-created` label because this issue has the `breaking-change` label.
85-
86-
87-
1. [ ] Create and link to this issue a matching issue in the dotnet/docs repo using the [breaking change documentation template](https://aka.ms/dotnet/docs/new-breaking-change-issue), then remove this `needs-breaking-change-doc-created` label.
88-
89-
90-
Tagging @dotnet/compat for awareness of the breaking change.
91-
description: Add breaking change doc label to issue
92-
- if:
93-
- payloadType: Pull_Request
94-
- labelAdded:
95-
label: breaking-change
96-
then:
97-
- addLabel:
98-
label: needs-breaking-change-doc-created
99-
- addReply:
100-
reply: >-
101-
Added `needs-breaking-change-doc-created` label because this PR has the `breaking-change` label.
102-
103-
104-
When you commit this breaking change:
105-
106-
107-
1. [ ] Create and link to this PR and the issue a matching issue in the dotnet/docs repo using the [breaking change documentation template](https://aka.ms/dotnet/docs/new-breaking-change-issue), then remove this `needs-breaking-change-doc-created` label.
108-
109-
2. [ ] Ask a committer to mail the `.NET Breaking Change Notification` DL.
110-
111-
112-
Tagging @dotnet/compat for awareness of the breaking change.
113-
description: Add breaking change doc label to PR
114-
onFailure:
115-
onSuccess:
1+
id:
2+
name: GitOps.PullRequestIssueManagement
3+
description: GitOps.PullRequestIssueManagement primitive
4+
owner:
5+
resource: repository
6+
disabled: false
7+
where:
8+
configuration:
9+
resourceManagementConfiguration:
10+
scheduledSearches:
11+
- description: Auto close "Area-NuGet" issues and add a comment pointing to NuGet repo
12+
frequencies:
13+
- daily:
14+
time: 16:0
15+
filters:
16+
- isIssue
17+
- isOpen
18+
- hasLabel:
19+
label: Area-NuGet
20+
actions:
21+
- addReply:
22+
reply: >-
23+
Thanks for creating this issue! We believe this issue is related to NuGet tooling, which is maintained by the NuGet team. Thus, we closed this one and encourage you to raise this issue in the [NuGet repository](https://github.com/NuGet/Home) instead. Don’t forget to check out [NuGet’s contributing guide](https://github.com/NuGet/Home/blob/dev/CONTRIBUTING.md#before-submitting-an-issue) before submitting an issue!
24+
25+
26+
If you believe this issue was closed out of error, please comment to let us know.
27+
28+
29+
Happy Coding!
30+
- closeIssue
31+
eventResponderTasks:
32+
- if:
33+
- payloadType: Pull_Request
34+
- hasLabel:
35+
label: Auto-Merge If Tests Pass
36+
then:
37+
- enableAutoMerge:
38+
mergeMethod: Squash
39+
description: Automatically merge pull requests
40+
- if:
41+
- payloadType: Pull_Request
42+
- labelRemoved:
43+
label: Auto-Merge If Tests Pass
44+
then:
45+
- disableAutoMerge
46+
description: Automatically merge pull requests
47+
- if:
48+
- payloadType: Issues
49+
- labelAdded:
50+
label: Area-ApiCompat
51+
then:
52+
- addReply:
53+
reply: '@dotnet/area-infrastructure-libraries a new issue has been filed in the ApiCompat area, please triage'
54+
description: Notify apicompat of new untriaged bugs
55+
- if:
56+
- payloadType: Issues
57+
- labelAdded:
58+
label: Area-ILLink
59+
then:
60+
- addReply:
61+
reply: '@dotnet/illink a new issue has been filed in the ILLink area, please triage'
62+
description: Notify linker of new untriaged bugs
63+
- if:
64+
- payloadType: Pull_Request
65+
- labelAdded:
66+
label: Area-AspNetCore
67+
- isOpen
68+
then:
69+
- addReply:
70+
reply: >-
71+
Thanks for your PR, @${issueAuthor}.
72+
73+
To learn about the PR process and branching schedule of this repo, please take a look at the [SDK PR Guide](https://github.com/dotnet/sdk/blob/main/documentation/project-docs/SDK-PR-guide.md).
74+
description: Remind ASP.NET Core PR authors the process to follow
75+
- if:
76+
- payloadType: Issues
77+
- labelAdded:
78+
label: breaking-change
79+
then:
80+
- addReply:
81+
reply: >-
82+
Refer to the [.NET SDK breaking change guidelines](https://github.com/dotnet/sdk/blob/main/documentation/project-docs/breaking-change-guidelines.md#required-process-for-all-net-sdk-breaking-changes)
83+
description: Add breaking change doc instructions to issue
84+
- if:
85+
- payloadType: Pull_Request
86+
- labelAdded:
87+
label: breaking-change
88+
then:
89+
- addLabel:
90+
label: needs-breaking-change-doc-created
91+
- addReply:
92+
reply: >-
93+
Added `needs-breaking-change-doc-created` label because this PR has the `breaking-change` label.
94+
95+
96+
When you commit this breaking change:
97+
98+
99+
1. [ ] Create and link to this PR and the issue a matching issue in the dotnet/docs repo using the [breaking change documentation template](https://aka.ms/dotnet/docs/new-breaking-change-issue), then remove this `needs-breaking-change-doc-created` label.
100+
101+
2. [ ] Ask a committer to mail the `.NET SDK Breaking Change Notification` email list.
102+
103+
104+
You can refer to the [.NET SDK breaking change guidelines](https://github.com/dotnet/sdk/blob/main/documentation/project-docs/breaking-change-guidelines.md)
105+
description: Add breaking change instructions to PR.
106+
onFailure:
107+
onSuccess:
+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Add Branch Lockdown Label to PRs
2+
3+
on:
4+
pull_request_target:
5+
workflow_dispatch: # Allows manual triggering of the workflow
6+
7+
permissions:
8+
actions: write # For managing the operation state cache
9+
issues: write
10+
11+
jobs:
12+
add-label:
13+
runs-on: ubuntu-latest
14+
15+
permissions:
16+
contents: read
17+
pull-requests: write
18+
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v2
22+
23+
- name: Install jq
24+
run: sudo apt-get install -y jq
25+
26+
- name: Add label to PRs
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
run: |
30+
# Determine the third Tuesday of the current month
31+
third_tuesday=$(date -d "$(date +%Y-%m-01) +14 days" +%Y-%m-%d)
32+
while [ $(date -d "$third_tuesday" +%u) -ne 2 ]; do
33+
third_tuesday=$(date -d "$third_tuesday + 1 day" +%Y-%m-%d)
34+
done
35+
36+
# Determine the first Tuesday of the current month
37+
first_tuesday=$(date -d "$(date +%Y-%m-01)" +%Y-%m-%d)
38+
while [ $(date -d "$first_tuesday" +%u) -ne 2 ]; do
39+
first_tuesday=$(date -d "$first_tuesday + 1 day" +%Y-%m-%d)
40+
done
41+
42+
# Get current date
43+
current_date=$(date +%Y-%m-%d)
44+
45+
echo "Current Date: $current_date"
46+
echo "Third Tuesday of the month: $third_tuesday"
47+
echo "First Tuesday of the month: $first_tuesday"
48+
49+
# Check if the current date is after the third Tuesday of this month or before the first Tuesday of this month
50+
if [[ "$current_date" > "$third_tuesday" || "$current_date" < "$first_tuesday" ]]; then
51+
echo "Within the label period. Checking if the branch matches..."
52+
53+
# Get all open PRs targeting branches release/8* and release/9* excluding release/9.0.3xx
54+
echo "Running gh pr list query..."
55+
prs=$(gh pr list --state open --limit 200 --json number,baseRefName,author,labels)
56+
echo "Total PRs Count: $(echo "$prs" | jq length)"
57+
echo "PRs JSON: $prs"
58+
59+
echo "Filtering PRs targeting release/8* and release/9* excluding release/9.0.3xx..."
60+
prs_targeting_branches=$(echo "$prs" | jq '[.[] | select(.baseRefName | test("^release/[89].*")) | select(.baseRefName | test("^release/9.0.3xx") | not)]')
61+
echo "Count of PRs targeting specific branches: $(echo "$prs_targeting_branches" | jq length)"
62+
63+
echo "Filtering PRs without Branch Lockdown label..."
64+
filtered_prs=$(echo "$prs_targeting_branches" | jq '[.[] | select(.labels | map(.name) | index("Branch Lockdown") | not) | .number]')
65+
echo "Filtered PRs without Branch Lockdown label JSON: $filtered_prs"
66+
echo "Count of Filtered PRs without Branch Lockdown label: $(echo "$filtered_prs" | jq length)"
67+
68+
# Loop through filtered PRs and add label
69+
for pr in $(echo "$filtered_prs" | jq -r '.[]'); do
70+
echo "Adding label to PR #$pr"
71+
gh pr edit $pr --add-label "Branch Lockdown"
72+
done
73+
else
74+
echo "Outside the label period. No labels added."
75+
fi

0 commit comments

Comments
 (0)