Skip to content

Commit 57fee45

Browse files
denelonmdanish-khTrenly
authored
Documentation Improvements (microsoft#144543)
Co-authored-by: Muhammad Danish <mdanishkhdev@gmail.com> Co-authored-by: Kaleb Luedtke <trenlymc@gmail.com>
1 parent 0072097 commit 57fee45

14 files changed

+324
-153
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
Checklist for Pull Requests
12
- [ ] Have you signed the [Contributor License Agreement](https://cla.opensource.microsoft.com/microsoft/winget-pkgs)?
3+
- [ ] Is there a linked Issue
4+
5+
Manifests
26
- [ ] Have you checked that there aren't other open [pull requests](https://github.com/microsoft/winget-pkgs/pulls) for the same manifest update/change?
37
- [ ] This PR only modifies one (1) manifest
4-
- [ ] Have you [validated](https://github.com/microsoft/winget-pkgs/blob/master/AUTHORING_MANIFESTS.md#validation) your manifest locally with `winget validate --manifest <path>`?
8+
- [ ] Have you [validated](https://github.com/microsoft/winget-pkgs/blob/master/doc/Authoring.md#validation) your manifest locally with `winget validate --manifest <path>`?
59
- [ ] Have you tested your manifest locally with `winget install --manifest <path>`?
610
- [ ] Does your manifest conform to the [1.6 schema](https://github.com/microsoft/winget-pkgs/tree/master/doc/manifest/schema/1.6.0)?
711

.github/actions/spelling/allow.txt

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ Inno
2020
INSTALLPATH
2121
ISVs
2222
Komac
23+
lexographic
24+
lexographically
2325
LOGPATH
2426
malware
2527
Mariocube

.github/actions/spelling/expect.txt

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ misclicks
2020
msft
2121
quhxl
2222
redistribution
23+
Repology
2324
russellbanks
2425
Tbot
2526
timezone

README.md

+11-70
Original file line numberDiff line numberDiff line change
@@ -10,80 +10,21 @@ This repository contains the manifest files for the **Windows Package Manager**
1010
> [!IMPORTANT]
1111
> At this time installers must be MSIX, MSI, APPX, or .exe application installers. Script-based installers and fonts are not currently supported.
1212
13-
The **Windows Package Manager** is an [open source client](https://github.com/microsoft/winget-cli) designed for command-line usage. If you are interested in exploring third-party repositories offering private winget package hosting, see [third-party repositories](THIRD_PARTY.md).
13+
The **Windows Package Manager** is an [open source client](https://github.com/microsoft/winget-cli) designed for command-line usage. If you are interested in exploring private repositories offering private WinGet package hosting, see [private repositories](doc/private/README.md).
1414

15-
# Submitting a Package
15+
# Documentation
1616

17-
To submit a package to this repository, you should follow these steps:
17+
Please check the [overview](doc/README.md) for detailed topics. Common topics for the WinGet Community repository are available below:
18+
* [Authoring a manifest](doc/README.md#authoring-a-manifest)
19+
* [Testing a manifest](doc/README.md#testing-a-manifest)
20+
* [Submitting a manifest](doc/README.md#submitting-a-manifest)
21+
* [Requesting a new package](doc/Issues.md#Request-a-New-Package)
22+
* [Requesting a new package version](doc/Issues.md#Request-a-New-Package-Version)
1823

19-
1. Follow the [Contributing](#contributing) guidelines below.
20-
2. [Author](AUTHORING_MANIFESTS.md) a Manifest.
21-
3. [Test](#test-your-manifest) your manifest.
22-
4. [Submit](#submit-your-pr) your pull request (PR).
23-
5. Respond to any feedback in your PR.
24+
## Repology
25+
[Repology](https://repology.org/), the packaging hub monitors package repositories comparing package versions and other information.
2426

25-
> Note: Please check the package's manifest you intend to submit does not already exist in the repository, and there are no open PRs for it in order to avoid duplicates.
26-
27-
## Authoring a Manifest
28-
29-
A few different tools are available to help you author a manifest.
30-
31-
- [Windows Package Manager Manifest Creator](https://github.com/microsoft/winget-create)
32-
- [YamlCreate.ps1](doc/tools/YamlCreate.md)
33-
- Other WinGet Manifest Creators developed by the community:
34-
- [Komac - Community Manifest Creator](https://github.com/russellbanks/Komac) (maintained by [**@russellbanks**](https://github.com/russellbanks))
35-
36-
> Note: Only one manifest may be submitted per PR.
37-
38-
## Test your manifest
39-
40-
Now that you have authored your manifest, you should make sure it works as expected.
41-
42-
> Note: You will need to run `winget settings --enable LocalManifestFiles` in an administrative shell before working with local manifests.
43-
44-
### Locally
45-
46-
1. Verify the syntax by executing the following command:
47-
48-
```
49-
winget validate --manifest <path-to-manifest>
50-
```
51-
52-
2. Test the install by executing the following command:
53-
54-
```
55-
winget install --manifest <path-to-manifest>
56-
```
57-
58-
For more details, see ["Submit packages to Windows Package Manager"](https://docs.microsoft.com/windows/package-manager/package) at Microsoft Docs.
59-
60-
### In Windows Sandbox
61-
62-
You can use the [Sandbox Test](Tools/SandboxTest.ps1) PowerShell script for testing a manifest installation in [Windows Sandbox](https://docs.microsoft.com/windows/security/threat-protection/windows-sandbox/windows-sandbox-overview). The manifest will be also validated.
63-
64-
Just provide the path to manifest as parameter:
65-
66-
```
67-
.\Tools\SandboxTest.ps1 <path-to-manifest>
68-
```
69-
70-
## Submit your PR
71-
72-
Once you have verified your manifest, it's time to submit a PR. Place your manifest in a folder path that matches the following structure:
73-
74-
```
75-
manifests\<first lower case letter of publisher>\<publisher>\<package>\<version>\
76-
```
77-
78-
### Validation Process
79-
80-
Your PR will go through a validation process. The core team or the Microsoft bot (BOT) will use [labels](https://docs.microsoft.com/windows/package-manager/package/winget-validation#pull-request-labels) to assist during the process. In case of a failure, the BOT will suggest the problem with the submission and assign the PR back to you.
81-
82-
### Respond to PR feedback
83-
84-
If your PR has been assigned to you, a timer will be triggered. You will have 7 days to resolve the issue, or the BOT will automatically close the PR.
85-
86-
Submissions to the repository are reviewed by Windows Package Manager administrators and/or community moderators. To help identify these individuals, we have provided a [Public Service Announcement](https://github.com/microsoft/winget-pkgs/issues/15674).
27+
[![Repository status](https://repology.org/badge/repository-big/winget.svg)](https://repology.org/repository/winget)
8728

8829
# Contributing
8930

Tools/YamlCreate.ps1

+90-81
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ if ($Settings) {
168168
exit
169169
}
170170

171-
$ScriptHeader = '# Created with YamlCreate.ps1 v2.3.5'
171+
$ScriptHeader = '# Created with YamlCreate.ps1 v2.4.0'
172172
$ManifestVersion = '1.6.0'
173173
$PSDefaultParameterValues = @{ '*:Encoding' = 'UTF8' }
174174
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
@@ -2059,108 +2059,114 @@ Function Read-LocaleMetadata {
20592059
# Uses this template and responses to create a PR
20602060
Function Read-PRBody {
20612061
$PrBodyContent = Get-Content $args[0]
2062-
ForEach ($_line in ($PrBodyContent | Where-Object { $_ -like '-*[ ]*' })) {
2063-
$_showMenu = $true
2064-
switch -Wildcard ( $_line ) {
2065-
'*CLA*' {
2066-
if ($ScriptSettings.SignedCLA -eq 'true') {
2067-
$PrBodyContentReply += @($_line.Replace('[ ]', '[X]'))
2068-
$_showMenu = $false
2069-
} else {
2062+
ForEach ($_line in $PrBodyContent) {
2063+
# | Where-Object { $_ -like '-*[ ]*' }))
2064+
if ($_line -like '-*[ ]*' )
2065+
{
2066+
$_showMenu = $true
2067+
switch -Wildcard ( $_line ) {
2068+
'*CLA*' {
2069+
if ($ScriptSettings.SignedCLA -eq 'true') {
2070+
$PrBodyContent = $PrBodyContent.Replace($_line,$_line.Replace('[ ]','[x]'))
2071+
$_showMenu = $false
2072+
} else {
2073+
$_menu = @{
2074+
Prompt = 'Have you signed the Contributor License Agreement (CLA)?'
2075+
Entries = @('[Y] Yes'; '*[N] No')
2076+
HelpText = 'Reference Link: https://cla.opensource.microsoft.com/microsoft/winget-pkgs'
2077+
HelpTextColor = ''
2078+
DefaultString = 'N'
2079+
}
2080+
}
2081+
}
2082+
2083+
'*open `[pull requests`]*' {
20702084
$_menu = @{
2071-
Prompt = 'Have you signed the Contributor License Agreement (CLA)?'
2085+
Prompt = "Have you checked that there aren't other open pull requests for the same manifest update/change?"
20722086
Entries = @('[Y] Yes'; '*[N] No')
2073-
HelpText = 'Reference Link: https://cla.opensource.microsoft.com/microsoft/winget-pkgs'
2087+
HelpText = 'Reference Link: https://github.com/microsoft/winget-pkgs/pulls'
20742088
HelpTextColor = ''
20752089
DefaultString = 'N'
20762090
}
20772091
}
2078-
}
20792092

2080-
'*open `[pull requests`]*' {
2081-
$_menu = @{
2082-
Prompt = "Have you checked that there aren't other open pull requests for the same manifest update/change?"
2083-
Entries = @('[Y] Yes'; '*[N] No')
2084-
HelpText = 'Reference Link: https://github.com/microsoft/winget-pkgs/pulls'
2085-
HelpTextColor = ''
2086-
DefaultString = 'N'
2093+
'*winget validate*' {
2094+
if ($? -and $(Get-Command 'winget' -ErrorAction SilentlyContinue)) {
2095+
$PrBodyContent = $PrBodyContent.Replace($_line,$_line.Replace('[ ]','[x]'))
2096+
$_showMenu = $false
2097+
} elseif ($script:Option -ne 'RemoveManifest') {
2098+
$_menu = @{
2099+
Prompt = "Have you validated your manifest locally with 'winget validate --manifest <path>'?"
2100+
Entries = @('[Y] Yes'; '*[N] No')
2101+
HelpText = 'Automatic manifest validation failed. Check your manifest and try again'
2102+
HelpTextColor = 'Red'
2103+
DefaultString = 'N'
2104+
}
2105+
} else {
2106+
$_showMenu = $false
2107+
}
20872108
}
2088-
}
20892109

2090-
'*winget validate*' {
2091-
if ($? -and $(Get-Command 'winget' -ErrorAction SilentlyContinue)) {
2092-
$PrBodyContentReply += @($_line.Replace('[ ]', '[X]'))
2093-
$_showMenu = $false
2094-
} elseif ($script:Option -ne 'RemoveManifest') {
2095-
$_menu = @{
2096-
Prompt = "Have you validated your manifest locally with 'winget validate --manifest <path>'?"
2097-
Entries = @('[Y] Yes'; '*[N] No')
2098-
HelpText = 'Automatic manifest validation failed. Check your manifest and try again'
2099-
HelpTextColor = 'Red'
2100-
DefaultString = 'N'
2110+
'*tested your manifest*' {
2111+
if ($script:SandboxTest -eq '0') {
2112+
$PrBodyContent = $PrBodyContent.Replace($_line,$_line.Replace('[ ]','[x]'))
2113+
$_showMenu = $false
2114+
} elseif ($script:Option -ne 'RemoveManifest') {
2115+
$_menu = @{
2116+
Prompt = "Have you tested your manifest locally with 'winget install --manifest <path>'?"
2117+
Entries = @('[Y] Yes'; '*[N] No')
2118+
HelpText = 'You did not test your Manifest in Windows Sandbox previously.'
2119+
HelpTextColor = 'Red'
2120+
DefaultString = 'N'
2121+
}
2122+
} else {
2123+
$_showMenu = $false
21012124
}
2102-
} else {
2103-
$_showMenu = $false
2104-
$PrBodyContentReply += @($_line)
21052125
}
2106-
}
21072126

2108-
'*tested your manifest*' {
2109-
if ($script:SandboxTest -eq '0') {
2110-
$PrBodyContentReply += @($_line.Replace('[ ]', '[X]'))
2111-
$_showMenu = $false
2112-
} elseif ($script:Option -ne 'RemoveManifest') {
2113-
$_menu = @{
2114-
Prompt = "Have you tested your manifest locally with 'winget install --manifest <path>'?"
2115-
Entries = @('[Y] Yes'; '*[N] No')
2116-
HelpText = 'You did not test your Manifest in Windows Sandbox previously.'
2117-
HelpTextColor = 'Red'
2118-
DefaultString = 'N'
2127+
'*schema*' {
2128+
if ($script:Option -ne 'RemoveManifest') {
2129+
$_Match = ($_line | Select-String -Pattern 'https://+.+(?=\))').Matches.Value
2130+
$_menu = @{
2131+
Prompt = $_line.TrimStart('- [ ]') -replace '\[|\]|\(.+\)', ''
2132+
Entries = @('[Y] Yes'; '*[N] No')
2133+
HelpText = "Reference Link: $_Match"
2134+
HelpTextColor = ''
2135+
DefaultString = 'N'
2136+
}
2137+
} else {
2138+
$_showMenu = $false
21192139
}
2120-
} else {
2140+
}
2141+
2142+
'*only modifies one*' {
2143+
$PrBodyContent = $PrBodyContent.Replace($_line,$_line.Replace('[ ]','[x]'))
21212144
$_showMenu = $false
2122-
$PrBodyContentReply += @($_line)
21232145
}
2124-
}
21252146

2126-
'*schema*' {
2127-
if ($script:Option -ne 'RemoveManifest') {
2128-
$_Match = ($_line | Select-String -Pattern 'https://+.+(?=\))').Matches.Value
2147+
'*linked issue*' {
2148+
# Linked issues is handled as a separate prompt below so that the issue numbers can be gathered
2149+
$_showMenu = $false
2150+
}
2151+
2152+
Default {
21292153
$_menu = @{
2130-
Prompt = $_line.TrimStart('- [ ]') -replace '\[|\]|\(.+\)', ''
2154+
Prompt = $_line.TrimStart('- [ ]')
21312155
Entries = @('[Y] Yes'; '*[N] No')
2132-
HelpText = "Reference Link: $_Match"
2156+
HelpText = ''
21332157
HelpTextColor = ''
21342158
DefaultString = 'N'
21352159
}
2136-
} else {
2137-
$_showMenu = $false
2138-
$PrBodyContentReply += @($_line)
21392160
}
21402161
}
21412162

2142-
'*only modifies one*' {
2143-
$PrBodyContentReply += @($_line.Replace('[ ]', '[X]'))
2144-
$_showMenu = $false
2145-
}
2146-
2147-
Default {
2148-
$_menu = @{
2149-
Prompt = $_line.TrimStart('- [ ]')
2150-
Entries = @('[Y] Yes'; '*[N] No')
2151-
HelpText = ''
2152-
HelpTextColor = ''
2153-
DefaultString = 'N'
2163+
if ($_showMenu) {
2164+
switch ( Invoke-KeypressMenu -Prompt $_menu['Prompt'] -Entries $_menu['Entries'] -DefaultString $_menu['DefaultString'] -HelpText $_menu['HelpText'] -HelpTextColor $_menu['HelpTextColor']) {
2165+
'Y' { $PrBodyContent = $PrBodyContent.Replace($_line,$_line.Replace('[ ]','[x]')) }
2166+
default { }
21542167
}
21552168
}
21562169
}
2157-
2158-
if ($_showMenu) {
2159-
switch ( Invoke-KeypressMenu -Prompt $_menu['Prompt'] -Entries $_menu['Entries'] -DefaultString $_menu['DefaultString'] -HelpText $_menu['HelpText'] -HelpTextColor $_menu['HelpTextColor']) {
2160-
'Y' { $PrBodyContentReply += @($_line.Replace('[ ]', '[X]')) }
2161-
default { $PrBodyContentReply += @($_line) }
2162-
}
2163-
}
21642170
}
21652171

21662172
# Request user to enter if there were any issues resolved by the PR
@@ -2171,11 +2177,14 @@ Function Read-PRBody {
21712177
}
21722178
switch ( Invoke-KeypressMenu -Prompt $_menu['Prompt'] -Entries $_menu['Entries'] -DefaultString $_menu['DefaultString']) {
21732179
'Y' {
2180+
$_line = ($PrBodyContent | Select-String 'linked issue').Line
2181+
if ($_line) { $PrBodyContent = $PrBodyContent.Replace($_line,$_line.Replace('[ ]','[x]')) }
2182+
21742183
# If there were issues resolved by the PR, request user to enter them
21752184
Write-Host
21762185
Write-Host "Enter issue number. For example`: 21983, 43509"
21772186
$ResolvedIssues = Read-Host -Prompt 'Resolved Issues' | UniqueItems
2178-
$PrBodyContentReply += @('')
2187+
$PrBodyContent += @('')
21792188

21802189
# Validate each of the issues entered by checking the URL to ensure it returns a 200 status code
21812190
Foreach ($i in ($ResolvedIssues.Split(',').Trim())) {
@@ -2199,15 +2208,15 @@ Function Read-PRBody {
21992208
Write-Host -ForegroundColor 'Red' "Invalid Issue: $i"
22002209
continue
22012210
}
2202-
$PrBodyContentReply += @("Resolves $i")
2211+
$PrBodyContent += @("Resolves $i")
22032212
} else {
22042213
$_checkedURL = "https://github.com/microsoft/winget-pkgs/issues/$i"
22052214
$_responseCode = Test-Url $_checkedURL
22062215
if ($_responseCode -ne 200) {
22072216
Write-Host -ForegroundColor 'Red' "Invalid Issue: $i"
22082217
continue
22092218
}
2210-
$PrBodyContentReply += @("* Resolves #$i")
2219+
$PrBodyContent += @("* Resolves #$i")
22112220
}
22122221
}
22132222
}
@@ -2216,11 +2225,11 @@ Function Read-PRBody {
22162225

22172226
# If we are removing a manifest, we need to include the reason
22182227
if ($CommitType -eq 'Remove') {
2219-
$PrBodyContentReply = @("## $($script:RemovalReason)"; '') + $PrBodyContentReply
2228+
$PrBodyContent = @("## $($script:RemovalReason)"; '') + $PrBodyContent
22202229
}
22212230

22222231
# Write the PR using a temporary file
2223-
Set-Content -Path PrBodyFile -Value $PrBodyContentReply | Out-Null
2232+
Set-Content -Path PrBodyFile -Value $PrBodyContent | Out-Null
22242233
gh pr create --body-file PrBodyFile -f
22252234
Remove-Item PrBodyFile
22262235
}

0 commit comments

Comments
 (0)