Skip to content

Commit e5ea3ed

Browse files
authored
Merge branch 'microsoft:master' into master
2 parents 47c296b + 7b1413b commit e5ea3ed

File tree

7,833 files changed

+159048
-29503
lines changed

Some content is hidden

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

7,833 files changed

+159048
-29503
lines changed
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
---
2+
applyTo: "manifests/**/*"
3+
---
4+
5+
# Windows Package Manager Community Repository - Copilot Instructions
6+
7+
## Repository Overview
8+
9+
This is the **Windows Package Manager (WinGet)** community repository containing **~415,000+ manifest files** for software packages installable via `winget`. The repository is a **manifest-only** repository - no application code, just YAML metadata files describing how to install Windows applications.
10+
11+
**Key Facts:**
12+
- **Primary Language:** YAML manifest files, PowerShell scripts for tooling
13+
- **Target Runtime:** Windows 10/11, Windows Package Manager client
14+
- **Size:** Large repository with alphabetically organized manifests
15+
- **Schema:** Uses multi-file YAML manifests (version 1.10.0 recommended, 1.9.0 also supported)
16+
- **Supported Installers:** MSIX, MSI, APPX, EXE only (scripts are not supported)
17+
18+
## Critical: How This Repository Works
19+
20+
**This is NOT a traditional code repository.** You typically work with **manifest files only**, not application source code. Each PR should modify **exactly one package** (one manifest set).
21+
22+
### Manifest Structure (Multi-File Format Required)
23+
24+
Manifests are located in: `manifests/<first-letter>/<Publisher>/<Package>/<Version>/`
25+
26+
For example: `manifests/m/Microsoft/WindowsTerminal/1.0.1401.0/`
27+
28+
**Required files per version:**
29+
1. `<PackageIdentifier>.yaml` - Version file (references other files)
30+
2. `<PackageIdentifier>.installer.yaml` - Installer details, URLs, SHA256
31+
3. `<PackageIdentifier>.locale.en-US.yaml` - Default locale metadata
32+
33+
**File Naming:** Must match `PackageIdentifier` exactly (case-sensitive).
34+
35+
## Instruction Priority
36+
37+
The instructions in the **Performance Rules**, **Allowed Local Searches**, and **Explicit Required Behavior** sections are **mandatory**.
38+
They override all other information in this file.
39+
40+
Copilot must always follow these rules when performing PR reviews, even if other documentation in this file describes general repository behavior.
41+
42+
## Performance Rules (Very Important)
43+
44+
This repository contains a very large directory: `manifests/`.
45+
Copilot must **never recursively scan or search the entire `manifests/` folder** during PR reviews.
46+
47+
Large-scale searches cause severe performance issues and timeouts.
48+
49+
## Allowed Local Searches (Package-Scoped Only)
50+
51+
When Copilot needs to compare or validate manifest conventions (for example, `ReleaseDate`, `InstallerSha256`, or schema field placement):
52+
53+
### Copilot is allowed to:
54+
- Search **ONLY within the package folder of the manifest being modified**.
55+
- This package folder follows the structure: `manifests/<first-letter>/<Publisher>/<Package>/<Version>/`
56+
57+
### Copilot MUST NOT:
58+
- Search sibling publishers
59+
- Search unrelated packages
60+
- Search the entire `manifests/` directory
61+
- Perform global searches to find examples
62+
- Use `search_dir` on `manifests/` or any directory wider than the package root
63+
64+
## Allowed Searches Outside the Manifests Directory
65+
66+
Copilot is allowed to search in **documentation folders** to understand schema rules, authoring guidelines, and repository conventions. These include, but are not limited to:
67+
68+
- `doc/`
69+
- `schemas/`
70+
- `README.md`
71+
- `CONTRIBUTING.md`
72+
- `PULL_REQUEST_TEMPLATE.md`
73+
- Any other non-manifest documentation files
74+
75+
These locations are safe to search because they contain guidance, not large numbers of manifest files.
76+
77+
However, **Copilot must still avoid recursive searches of the `manifests/` directory**, except for the package-scoped searches described earlier.
78+
79+
---
80+
81+
## Explicit Required Behavior
82+
83+
When reviewing a PR:
84+
85+
- Focus on **only the changed manifest files** and their immediate package folder.
86+
- If searching for "similar manifests" or examples:
87+
- Restrict the search scope to the **same package root**, e.g.:
88+
89+
For:
90+
```
91+
manifests/m/Microsoft/WSL/2.6.2/
92+
```
93+
Only search within:
94+
```
95+
manifests/m/Microsoft/WSL/
96+
manifests/m/Microsoft/
97+
```
98+
99+
- DO NOT search:
100+
```
101+
manifests/m/*
102+
manifests/*
103+
```
104+
or the entire repo for matching fields
105+
106+
- If broader repo context seems needed:
107+
- **Skip the global search** and exactly say: "Global search prevented by repository instructions."
108+
- Continue the review using only local context
109+
110+
---
111+
112+
## Summary
113+
114+
- Only analyze **diffs** and **local package manifests**.
115+
- Never run expensive global scans.
116+
- Never crawl the entire `manifests/` directory.
117+
- Keep all search operations **package-scoped** for reliability.
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
applyTo: "!manifests/**/*"
3+
---
4+
5+
# Windows Package Manager Community Repository - Copilot Instructions
6+
7+
## Repository Overview
8+
9+
This is the **Windows Package Manager (WinGet)** community repository containing **~415,000+ manifest files** for software packages installable via `winget`. This repository primarily contains Windows Package Manager manifests, but also includes tooling, documentation, schemas, and CI configuration.
10+
11+
**Key Facts:**
12+
- **Primary Language:** YAML manifest files, PowerShell scripts for tooling
13+
- **Target Runtime:** Windows 10/11, Windows Package Manager client
14+
- **Size:** Large repository with alphabetically organized manifests
15+
- **Schema:** Uses multi-file YAML manifests (version 1.10.0 recommended, 1.9.0 also supported)
16+
- **Supported Installers:** MSIX, MSI, APPX, EXE only (scripts are not supported)
17+
18+
## Critical: How This Repository Works
19+
20+
**This is NOT a traditional code repository.** You typically work with manifest files only **or modifying tooling, documentation, or infrastructure files**, not application source code.
21+
22+
## Instruction Priority
23+
24+
The instructions in the **Performance Rules**, **Allowed Local Searches**, and **Explicit Required Behavior** sections are **mandatory**.
25+
They override all other information in this file.
26+
27+
Copilot must always follow these rules when performing PR reviews, even if other documentation in this file describes general repository behavior.
28+
29+
## Performance Rules (Very Important)
30+
31+
This repository contains a very large directory: `manifests/`.
32+
Copilot must **never recursively scan or search the entire `manifests/` folder** during PR reviews. This rule applies even when the pull request does not modify any manifest files.
33+
34+
Large-scale searches cause severe performance issues and timeouts.
35+
36+
## Allowed Searches Outside the Manifests Directory
37+
38+
Copilot is allowed to search in **documentation folders** to understand schema rules, authoring guidelines, and repository conventions. These include, but are not limited to:
39+
40+
- `doc/`
41+
- `schemas/`
42+
- `README.md`
43+
- `CONTRIBUTING.md`
44+
- `PULL_REQUEST_TEMPLATE.md`
45+
- Any other non-manifest documentation files
46+
47+
These locations are safe to search because they contain guidance, not large numbers of manifest files.
48+
49+
However, **Copilot must still avoid recursive searches of the `manifests/` directory**, except for the package-scoped searches described earlier.
50+
51+
---
52+
53+
## Explicit Required Behavior
54+
55+
When reviewing a non-manifest PR:
56+
57+
- Focus on the files changed in the pull request.
58+
- Use nearby documentation, tooling, or configuration files for context when helpful.
59+
- Avoid unnecessary repository-wide searches.
60+
61+
If broader repository context seems needed:
62+
63+
- **Skip the global search** and exactly say: "Global search prevented by repository instructions."
64+
- Continue the review using only the available non-manifest context.
65+
- Do not attempt to search the `manifests/` directory under any circumstances.
66+
67+
---
68+
69+
## Summary
70+
71+
- Only analyze **diffs** and **relevant non-manifest files.**
72+
- Never run expensive global scans.
73+
- Never crawl the entire `manifests/` directory.
74+
- Keep all search operations **package-scoped** for reliability.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
id: labelAdded.manualValidationCompleted
2+
name: GitOps.PullRequestIssueManagement
3+
description: Handlers when "Manual-Validation-Completed" label is added
4+
owner:
5+
resource: repository
6+
disabled: false
7+
where:
8+
configuration:
9+
resourceManagementConfiguration:
10+
eventResponderTasks:
11+
- description: >-
12+
When the label "Manual-Validation-Completed" is added to a pull request
13+
* Add the PR specific reply notifying the issue author
14+
* Remove the Internal-Error-Dynamic-Scan label
15+
* Remove the Validation-No-Executables label
16+
* Remove the Validation-Executable-Error label
17+
if:
18+
- payloadType: Pull_Request
19+
- labelAdded:
20+
label: Manual-Validation-Completed
21+
then:
22+
- addReply:
23+
reply: >-
24+
This pull request has been marked as "Manual-Validation-Completed".
25+
A microsoft employee still needs to review and approve the changes before it can be merged.
26+
27+
28+
Template: msftbot/microsoft/mvpValidated
29+
- removeLabel:
30+
label: Internal-Error-Dynamic-Scan
31+
- removeLabel:
32+
label: Validation-No-Executables
33+
- removeLabel:
34+
label: Validation-Executable-Error
35+
# The policy service should trigger even when the label was added by the policy service
36+
triggerOnOwnActions: true
37+
onFailure:
38+
onSuccess:

.github/policies/labelManagement.issueOpened.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ configuration:
4343
- addReply:
4444
reply: >-
4545
[![Validation Pipeline Badge](https://img.shields.io/endpoint?url=https://winget-validation-pme-f8gqfjhzacawbecy.z01.azurefd.net/api/GetServiceComponentStatusBadge?component=ValidationPipeline "Validation Pipeline Badge")](https://dev.azure.com/shine-oss/winget-pkgs/_build?definitionId=14)&nbsp;[![Publish Pipeline Badge](https://img.shields.io/endpoint?url=https://winget-validation-pme-f8gqfjhzacawbecy.z01.azurefd.net/api/GetServiceComponentStatusBadge?component=PublishPipeline "Publish Pipeline Badge")](https://dev.azure.com/shine-oss/winget-pkgs/_build?definitionId=12)
46+
47+
48+
> [!IMPORTANT]
49+
50+
> [P.S.A. Validation throughput (#325114)](https://www.github.com/microsoft/winget-pkgs/issues/325114)
4651
# If the user is a first-time contributor, add the Needs-CLA Label
4752
- if:
4853
- activitySenderHasAssociation:
@@ -103,6 +108,9 @@ configuration:
103108
- not:
104109
filesMatchPattern:
105110
pattern: ^manifests/*
111+
- not:
112+
filesMatchPattern:
113+
pattern: ^fonts/*
106114
- not:
107115
filesMatchPattern:
108116
pattern: DevOpsPipelineDefinitions
@@ -196,7 +204,7 @@ configuration:
196204
- addLabel:
197205
label: Project-File
198206
- description: >-
199-
When a PR is opened/updated, if the content contains .validation and user is not repo admin
207+
When a PR is opened/updated, if the content contains .validation and user is not repo admin or authorized bot
200208
* Add Author-Not-Authorized label
201209
if:
202210
- payloadType: Pull_Request
@@ -209,6 +217,9 @@ configuration:
209217
- not:
210218
activitySenderHasPermission:
211219
permission: Admin
220+
- not:
221+
isActivitySender:
222+
user: wingetbot
212223
then:
213224
- addLabel:
214225
label: Author-Not-Authorized
@@ -227,6 +238,18 @@ configuration:
227238
- not:
228239
activitySenderHasPermission:
229240
permission: Admin
241+
- not:
242+
isActivitySender:
243+
user: dkbennett
244+
- not:
245+
isActivitySender:
246+
user: denelon
247+
- not:
248+
isActivitySender:
249+
user: Trenly
250+
- not:
251+
isActivitySender:
252+
user: mdanish-kh
230253
then:
231254
- addReply:
232255
reply: >-

.github/policies/labelManagement.issueUpdated.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,8 @@ configuration:
295295
label: Manifest-Version-Deprecated
296296
- removeLabel:
297297
label: Manifest-Version-Error
298+
- removeLabel:
299+
label: Manual-Validation-Completed
298300
- removeLabel:
299301
label: Moderator-Approved
300302
- removeLabel:
@@ -419,6 +421,7 @@ configuration:
419421
user: russellbanks
420422
then:
421423
# Don't remove Changes-Requested here because it is just a re-run, no new commits have been added
424+
# Don't remove Manual-Validation-Completed here because it is just a re-run, no new commits have been added
422425
- removeLabel:
423426
label: Author-Not-Authorized
424427
- removeLabel:
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
id: microsoftMVPTriggers
2+
name: GitOps.PullRequestIssueManagement
3+
description: Defines the users and permissions available to Microsoft MVPs
4+
owner:
5+
resource: repository
6+
disabled: false
7+
where:
8+
configuration:
9+
resourceManagementConfiguration:
10+
eventResponderTasks:
11+
- if:
12+
# If the activity sender is a microsoft MVP and not the issue author
13+
- or:
14+
- isActivitySender:
15+
user: Trenly
16+
issueAuthor: False
17+
- isActivitySender:
18+
user: mdanish-kh
19+
issueAuthor: False
20+
then:
21+
# If the payload is an issue_Comment or a Pull_Request_Review_Comment
22+
- if:
23+
- or:
24+
- payloadType: Issue_Comment
25+
- payloadType: Pull_Request_Review_Comment
26+
# Remove the Needs-Triage label
27+
# Take different actions based on the comment pattern
28+
then:
29+
# Manual-Validation-Completed
30+
- if:
31+
- commentContains:
32+
pattern: '\[[Pp]olicy\]\s+[mM]anual[\s-][vV]alidation[\s-][cC]ompleted'
33+
isRegex: True
34+
then:
35+
- addLabel:
36+
label: Manual-Validation-Completed
37+
onFailure:
38+
onSuccess:

.github/policies/moderatorTriggers.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,8 @@ configuration:
574574
label: Manifest-Singleton-Deprecated
575575
- removeLabel:
576576
label: Manifest-Version-Deprecated
577+
- removeLabel:
578+
label: Manual-Validation-Completed
577579
- removeLabel:
578580
label: Moderator-Approved
579581
- removeLabel:

.github/workflows/scriptAnalyzer.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ on:
66
- master
77
paths:
88
- "**/*.ps1"
9+
- "**/*.psm1"
910
push:
1011
paths:
1112
- "**/*.ps1"
13+
- "**/*.psm1"
1214

1315
permissions:
1416
contents: read # Needed to check out the code
@@ -26,7 +28,8 @@ jobs:
2628
- name: Run PSScriptAnalyzer
2729
run: |
2830
# Run PSScriptAnalyzer on all PowerShell scripts
29-
$results = Get-ChildItem -Recurse -Filter *.ps1 | Invoke-ScriptAnalyzer
31+
$results = @(Get-ChildItem -Recurse -Filter *.ps1 | Invoke-ScriptAnalyzer)
32+
$results += @(Get-ChildItem -Recurse -Filter *.psm1 | Invoke-ScriptAnalyzer)
3033
if ($results) {
3134
Write-Output $results | Format-List -GroupBy ScriptName
3235
}

0 commit comments

Comments
 (0)