Skip to content

Commit b754711

Browse files
authored
Merge branch 'microsoft:master' into master
2 parents 8e085e2 + 66d215b commit b754711

File tree

52,502 files changed

+696756
-208625
lines changed

Some content is hidden

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

52,502 files changed

+696756
-208625
lines changed

.github/actions/spelling/allow.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ INSTALLPATH
2323
ISVs
2424
Komac
2525
LOGPATH
26+
Linux
2627
malware
2728
Mariocube
2829
microsoft
@@ -55,6 +56,7 @@ uninstaller
5556
uninstalls
5657
upvote
5758
versioning
59+
vscode
5860
website
5961
winget
6062
wingetbot

.github/policies/labelAdded.highestVersionRemoval.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ configuration:
2929
Please provide the reason for removal to help our moderators understand the context.
3030
3131
32+
(This might be in error if the version is switching from semantic to string, or string to semantic.)
33+
34+
3235
Template: msftbot/highestVersionRemoval
3336
- assignTo:
3437
author: True

.github/policies/labelAdded.lastVersionRemoval.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,13 @@ configuration:
2323
Hello @${issueAuthor},
2424
2525
26-
This PR removes the last version of the package from the repository.
26+
This PR removes the last version of this package in the repository, meaning it will completely remove this package from WinGet.
2727
2828
29-
Please check if the package requires an update or is available from another source.
29+
Please provide the reason for removal to help our moderators understand the context and check if the package requires an update or is available from another source.
30+
31+
32+
Is it available from another location? (This might be in error if the version is switching from semantic to string, or string to semantic.)
3033
3134
3235
Template: msftbot/lastVersionRemoval
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
id: labelAdded.validationDefenderError
2+
name: GitOps.PullRequestIssueManagement
3+
description: Handlers when "Validation-Defender-Error" 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 "Validation-Defender-Error" is added to a pull request
13+
* Add the PR specific reply notifying the issue author
14+
* Assign to the Author
15+
* Label with Needs-Author-Feedback
16+
* Remove the Needs-Attention Label
17+
if:
18+
- payloadType: Pull_Request
19+
- labelAdded:
20+
label: Validation-Defender-Error
21+
then:
22+
- addReply:
23+
reply: >-
24+
Hello @${issueAuthor},
25+
26+
27+
The package manager bot was blocked from installing one of the installers listed in the url field, and cannot continue.
28+
29+
30+
The application included in this pull request failed to pass the [Installers Scan](https://docs.microsoft.com/en-us/windows/package-manager/package/winget-validation) test. This test is designed to ensure that the application installs on all environments without warnings.
31+
32+
33+
Please check to ensure the installer URL is correct and update the URL and the Hash if a change is made.
34+
35+
36+
If the package is mistakenly flagged as malware, you can [submit the installer(s) to the Microsoft Defender team for analysis](https://www.microsoft.com/en-us/wdsi/filesubmission).
37+
38+
39+
For more details on this error, see [Defender errors](https://learn.microsoft.com/en-us/windows/package-manager/package/repository#error-labels).
40+
41+
42+
Template: msftbot/validationError/installers/validationDefender
43+
- assignTo:
44+
author: True
45+
- addLabel:
46+
label: Needs-Author-Feedback
47+
- removeLabel:
48+
label: Needs-Attention # This will automatically assign the ICM Users
49+
# The policy service should trigger even when the label was added by the policy service
50+
triggerOnOwnActions: true
51+
onFailure:
52+
onSuccess:
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: PSScriptAnalyzer
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
paths:
8+
- "**/*.ps1"
9+
push:
10+
paths:
11+
- "**/*.ps1"
12+
13+
permissions:
14+
contents: read # Needed to check out the code
15+
pull-requests: read # Needed to read pull request details
16+
17+
jobs:
18+
analyze:
19+
runs-on: windows-latest
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v3
23+
- name: Install PSScriptAnalyzer
24+
run: |
25+
Install-Module -Name PSScriptAnalyzer -Force -SkipPublisherCheck -Scope CurrentUser
26+
- name: Run PSScriptAnalyzer
27+
run: |
28+
# Run PSScriptAnalyzer on all PowerShell scripts
29+
$results = Get-ChildItem -Recurse -Filter *.ps1 | Invoke-ScriptAnalyzer
30+
if ($results) {
31+
Write-Output $results | Format-List -GroupBy ScriptName
32+
}
33+
34+
# If errors are found, exit with a non-zero exit code to fail the job
35+
if ($results.where({$_.Severity-eq 'Error'})) {
36+
Write-Host "Found script issues (errors)."
37+
exit 1 # Exit with a non-zero status to fail the job
38+
} else {
39+
Write-Host "No blocking detections."
40+
}

.github/workflows/spellCheck.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
steps:
6868
- name: check-spelling
6969
id: spelling
70-
uses: check-spelling/[email protected].21
70+
uses: check-spelling/[email protected].24
7171
with:
7272
suppress_push_for_open_pull_request: 1
7373
checkout: true

DevOpsPipelineDefinitions/publish-pipeline.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,13 @@ extends:
8686
ValidationStorageAccountName: $(ValidationStorageAccountName)
8787
CacheStorageAccountName: $(CacheStorageAccountName)
8888
StorageManagedIdentityClientId: $(StorageManagedIdentityClientId)
89-
ExecutionEnvironment: $(ExecutionEnvironment)
90-
PackagePublisher: $(PackagePublisher)
91-
DIApplicationInsightKey: $(DIApplicationInsightKey)
9289
WinGet:AppConfig:PrimaryEndpoint: $(AppConfigPrimaryEndpoint)
9390
WinGet:AppConfig:SecondaryEndpoint: $(AppConfigSecondaryEndpoint)
94-
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
91+
DIApplicationInsightKey: $(DIApplicationInsightKey)
9592
GithubServiceAccountToken: $(GithubServiceAccountToken)
93+
PackagePublisher: $(PackagePublisher)
94+
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
95+
ExecutionEnvironment: $(WinGetSvc.ExecutionEnvironment)
9696

9797
# Agentless phase. Depends on previous job.
9898
- job: 'SignPackage'

DevOpsPipelineDefinitions/rebuild-pipeline.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,12 @@ extends:
8585
ValidationStorageAccountName: $(ValidationStorageAccountName)
8686
CacheStorageAccountName: $(CacheStorageAccountName)
8787
StorageManagedIdentityClientId: $(StorageManagedIdentityClientId)
88-
ExecutionEnvironment: $(ExecutionEnvironment)
89-
PackagePublisher: $(PackagePublisher)
90-
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
91-
DIApplicationInsightKey: $(DIApplicationInsightKey)
9288
WinGet:AppConfig:PrimaryEndpoint: $(AppConfigPrimaryEndpoint)
9389
WinGet:AppConfig:SecondaryEndpoint: $(AppConfigSecondaryEndpoint)
90+
DIApplicationInsightKey: $(DIApplicationInsightKey)
91+
PackagePublisher: $(PackagePublisher)
92+
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
93+
ExecutionEnvironment: $(WinGetSvc.ExecutionEnvironment)
9494
SkipPausePublishPipeline: $(Rebuild.SkipPausePublishPipeline)
9595

9696
# Agentless phase. Depends on previous job.

DevOpsPipelineDefinitions/validation-pipeline.yaml

Lines changed: 4 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,8 @@ extends:
6565
SCAN_ENDPOINT: $(AzFuncScanEndpoint)
6666
INSTALLATION_ENDPOINT: $(AzFuncInstallationVerificationEndpoint)
6767
LABEL_ENDPOINT: $(AzFuncSetLabelOnPullRequestEndpoint)
68-
CLEANUP_ENDPOINT: $(AzFuncCleanupEndpoint)
6968
LABEL_KEY: $(AzureFunctionLabelKey)
7069
CATALOG_CONTENT_VERIFICATION_ENDPOINT: $(AzFuncCatalogContentVerificationEndpoint)
71-
MISSING_MANIFEST_FIELDS_VERIFICATION_ENDPOINT: $(AzFuncMissingManifestFieldsVerificationEndpoint)
7270
inputs:
7371
script: 'winget_validation_setup.cmd'
7472
workingDirectory: scripts
@@ -87,12 +85,10 @@ extends:
8785
env:
8886
ValidationStorageAccountName: $(ValidationStorageAccountName)
8987
StorageManagedIdentityClientId: $(StorageManagedIdentityClientId)
90-
GithubRepository: $(GithubRepository)
91-
GithubServiceAccountToken: $(GithubServiceAccountToken)
92-
ExecutionEnvironment: $(ExecutionEnvironment)
93-
DIApplicationInsightKey: $(DIApplicationInsightKey)
9488
WinGet:AppConfig:PrimaryEndpoint: $(AppConfigPrimaryEndpoint)
9589
WinGet:AppConfig:SecondaryEndpoint: $(AppConfigSecondaryEndpoint)
90+
DIApplicationInsightKey: $(DIApplicationInsightKey)
91+
ExecutionEnvironment: $(WinGetSvc.ExecutionEnvironment)
9692

9793
# Validates manifest integrity.
9894
- task: AzureCLI@2
@@ -109,10 +105,10 @@ extends:
109105
ValidationStorageAccountName: $(ValidationStorageAccountName)
110106
CacheStorageAccountName: $(CacheStorageAccountName)
111107
StorageManagedIdentityClientId: $(StorageManagedIdentityClientId)
112-
DIApplicationInsightKey: $(DIApplicationInsightKey)
113-
ExecutionEnvironment: $(ExecutionEnvironment)
114108
WinGet:AppConfig:PrimaryEndpoint: $(AppConfigPrimaryEndpoint)
115109
WinGet:AppConfig:SecondaryEndpoint: $(AppConfigSecondaryEndpoint)
110+
DIApplicationInsightKey: $(DIApplicationInsightKey)
111+
ExecutionEnvironment: $(WinGetSvc.ExecutionEnvironment)
116112

117113
# Agentless phase. Depends on previous job.
118114
- job: 'ContentValidation'
@@ -314,13 +310,11 @@ extends:
314310
HostKeySecret: $[ dependencies.FileValidation.outputs['wingetsetup.hostkey']]
315311
LabelKeySecret : $[ dependencies.FileValidation.outputs['wingetsetup.labelkey']]
316312
LabelEndpointSecret: $[ dependencies.FileValidation.outputs['wingetsetup.labelEndpoint']]
317-
CleanupEndpointSecret: $[ dependencies.filevalidation.outputs['wingetsetup.cleanupEndpoint']]
318313
steps:
319314

320315
# Set label in GitHub PullRequest.
321316
- task: AzureFunction@1
322317
displayName: 'Set Label'
323-
condition: eq(variables['WinGet.RepositoryType'], 'GitHub')
324318
inputs:
325319
function: '$(LabelEndpointSecret)'
326320
key: '$(LabelKeySecret)'
@@ -341,27 +335,3 @@ extends:
341335
"pullRequestNumber": "$(System.PullRequest.PullRequestNumber)"
342336
}
343337
waitForCompletion: "true"
344-
345-
# Cleanup resources.
346-
- task: AzureFunction@1
347-
displayName: 'Validation cleanup'
348-
inputs:
349-
function: '$(CleanupEndpointSecret)'
350-
key: '$(HostKeySecret)'
351-
body: |
352-
{
353-
"operationId": "$(Build.BuildNumber)",
354-
"buildId": "$(Build.BuildId)",
355-
"planUrl": "$(system.CollectionUri)",
356-
"hubName": "$(system.HostType)",
357-
"projectId": "$(system.TeamProjectId)",
358-
"planId": "$(system.PlanId)",
359-
"jobId": "$(system.JobId)",
360-
"timelineId": "$(system.TimelineId)",
361-
"taskInstanceId": "$(system.TaskInstanceId)",
362-
"authToken": "$(system.AccessToken)",
363-
"repository": "$(build.repository.id)",
364-
"pipelineType": "ValidationPipeline",
365-
"pullRequestNumber": "$(System.PullRequest.PullRequestNumber)",
366-
}
367-
waitForCompletion: "true"

0 commit comments

Comments
 (0)