-
-
Notifications
You must be signed in to change notification settings - Fork 0
Codex/raycast suggestion integration #143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
b05d749
59bb57f
d6545c7
44b71a6
2c459a5
2a3c5c4
7ae3653
92bfb64
804232e
8ba68c0
bcf862b
6614922
6d1534d
c0baa8b
62ff52f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,7 +29,7 @@ | |
| }, | ||
| { | ||
| "type": "winget", | ||
| "id": "tonythethompson.QuickShell" | ||
| "id": "tonythethompson.QuickShellforCmdPal" | ||
| } | ||
| ] | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,8 +1,12 @@ | ||||||||||
| # Submit or update Quick Shell in the Command Palette Extension Gallery. | ||||||||||
| # Requires: gh auth login, fork of microsoft/CmdPal-Extensions | ||||||||||
| # | ||||||||||
| # Always creates a fresh branch from upstream main and a normal push (no force). | ||||||||||
| param( | ||||||||||
| [switch]$DryRun, | ||||||||||
| [string]$Branch = 'update-tonythethompson-quickshell' | ||||||||||
| [string]$Branch = '', | ||||||||||
| [string]$Title = 'Update tonythethompson.quickshell gallery listing', | ||||||||||
| [string]$Body = '' | ||||||||||
| ) | ||||||||||
|
|
||||||||||
| $ErrorActionPreference = 'Stop' | ||||||||||
|
|
@@ -15,8 +19,12 @@ if (-not (Test-Path $source)) { | |||||||||
| throw "Missing gallery source at $source" | ||||||||||
| } | ||||||||||
|
|
||||||||||
| if ([string]::IsNullOrWhiteSpace($Branch)) { | ||||||||||
| $Branch = 'update-tonythethompson-quickshell-' + (Get-Date -Format 'yyyyMMdd-HHmmss') | ||||||||||
| } | ||||||||||
|
|
||||||||||
| if ($DryRun) { | ||||||||||
| Write-Host "Would sync fork $upstream, copy $source, and open PR on branch $Branch" | ||||||||||
| Write-Host "Would sync fork $upstream, copy $source, push branch $Branch (no force), and open a PR" | ||||||||||
| exit 0 | ||||||||||
| } | ||||||||||
|
|
||||||||||
|
|
@@ -41,36 +49,55 @@ if (-not $forkExists) { | |||||||||
| } | ||||||||||
|
|
||||||||||
| Write-Host "Using fork: $forkRepo" | ||||||||||
| # Sync the fork's default branch from upstream (not a branch force-push). | ||||||||||
| gh repo sync $forkRepo --source $upstream --force 2>$null | ||||||||||
| gh repo clone $forkRepo $workDir -- --depth=1 | ||||||||||
| Push-Location $workDir | ||||||||||
|
Comment on lines
+52
to
55
|
||||||||||
| git checkout -b $Branch | ||||||||||
| $dest = Join-Path $workDir 'extensions\tonythethompson\quickshell' | ||||||||||
| New-Item -ItemType Directory -Force -Path $dest | Out-Null | ||||||||||
| # Replace listing contents so renamed/removed screenshots do not linger. | ||||||||||
| Get-ChildItem -Force $dest | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue | ||||||||||
| Copy-Item -Recurse -Force (Join-Path $source '*') $dest | ||||||||||
| git add -A extensions/tonythethompson/quickshell | ||||||||||
| git status --short | ||||||||||
| git commit -m "Update tonythethompson.quickshell gallery listing" | ||||||||||
| git push -u origin $Branch --force-with-lease | ||||||||||
| $bodyFile = Join-Path $env:TEMP 'cmdpal-gallery-pr-body.md' | ||||||||||
| @' | ||||||||||
| try { | ||||||||||
| git checkout -b $Branch | ||||||||||
| $dest = Join-Path $workDir 'extensions\tonythethompson\quickshell' | ||||||||||
| New-Item -ItemType Directory -Force -Path $dest | Out-Null | ||||||||||
| # Replace listing contents so renamed/removed screenshots do not linger. | ||||||||||
| Get-ChildItem -Force $dest | Remove-Item -Recurse -Force | ||||||||||
| Copy-Item -Recurse -Force (Join-Path $source '*') $dest | ||||||||||
|
Comment on lines
+60
to
+62
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
The comment says this replace-before-copy step exists so "renamed/removed screenshots do not linger", but a failed 🧰 Tools🪛 PSScriptAnalyzer (1.25.0)[warning] Missing BOM encoding for non-ASCII encoded file 'submit-cmdpal-gallery.ps1' (PSUseBOMForUnicodeEncodedFile) 🤖 Prompt for AI Agents |
||||||||||
| git add -A extensions/tonythethompson/quickshell | ||||||||||
| git status --short | ||||||||||
|
|
||||||||||
| if (-not (git status --porcelain)) { | ||||||||||
| throw 'No gallery listing changes to commit.' | ||||||||||
| } | ||||||||||
|
|
||||||||||
| git commit -m $Title | ||||||||||
| git push -u origin $Branch | ||||||||||
| if ($LASTEXITCODE -ne 0) { | ||||||||||
| throw "git push failed for branch $Branch (refusing to force-push)." | ||||||||||
| } | ||||||||||
|
|
||||||||||
| if ([string]::IsNullOrWhiteSpace($Body)) { | ||||||||||
| $Body = @" | ||||||||||
| ## Summary | ||||||||||
| Updates the **Quick Shell** Command Palette Extension Gallery listing. | ||||||||||
|
|
||||||||||
| - New product logo (`icon.png`, Store AppTile) | ||||||||||
| - Screenshots refreshed for current workspace UI (list, create, settings, detail) | ||||||||||
| - Description/tags aligned with current product language | ||||||||||
| - Install sources unchanged: Microsoft Store `9PC8S6LNRT3R`, WinGet `tonythethompson.QuickShell` | ||||||||||
| Describe only what this PR changes (for example logo, screenshots, copy, or install sources). Do not reuse stale bullets from a prior submission. | ||||||||||
|
|
||||||||||
| ## Test plan | ||||||||||
| - [ ] CI schema validation passes | ||||||||||
| - [ ] Store product ID resolves | ||||||||||
| - [ ] Icon under 100 KB; screenshots under 1 MB each | ||||||||||
| - [ ] Tags ≤ 5 | ||||||||||
| '@ | Set-Content -Path $bodyFile -Encoding utf8 | ||||||||||
| $prUrl = gh pr create --repo $upstream --head "${login}:$Branch" --title 'Update tonythethompson.quickshell gallery listing' --body-file $bodyFile | ||||||||||
| Remove-Item $bodyFile -Force -ErrorAction SilentlyContinue | ||||||||||
| Pop-Location | ||||||||||
| Write-Host "PR opened: $prUrl" | ||||||||||
| - [ ] Store / WinGet install source IDs resolve | ||||||||||
| - [ ] Icon under 100 KB; screenshots under 1 MB each (when media changed) | ||||||||||
| - [ ] Tags: at most 5 | ||||||||||
| "@ | ||||||||||
|
Comment on lines
+77
to
+88
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Non-ASCII Static analysis flags this file as missing a BOM for its non-ASCII content; the 🧰 Tools🪛 PSScriptAnalyzer (1.25.0)[warning] Missing BOM encoding for non-ASCII encoded file 'submit-cmdpal-gallery.ps1' (PSUseBOMForUnicodeEncodedFile) 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||||||||||
| } | ||||||||||
|
greptile-apps[bot] marked this conversation as resolved.
|
||||||||||
|
|
||||||||||
| $bodyFile = Join-Path $env:TEMP 'cmdpal-gallery-pr-body.md' | ||||||||||
| Set-Content -Path $bodyFile -Value $Body -Encoding utf8 | ||||||||||
|
Comment on lines
+91
to
+92
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win Use a per-invocation PR body file. Line 91 uses the fixed path Generate a unique temporary path and remove it in a nested Proposed fix- $bodyFile = Join-Path $env:TEMP 'cmdpal-gallery-pr-body.md'
+ $bodyFile = [System.IO.Path]::GetTempFileName()📝 Committable suggestion
Suggested change
🧰 Tools🪛 PSScriptAnalyzer (1.25.0)[warning] Missing BOM encoding for non-ASCII encoded file 'submit-cmdpal-gallery.ps1' (PSUseBOMForUnicodeEncodedFile) 🤖 Prompt for AI Agents |
||||||||||
| $prUrl = gh pr create --repo $upstream --head "${login}:$Branch" --title $Title --body-file $bodyFile | ||||||||||
| if ($LASTEXITCODE -ne 0 -or [string]::IsNullOrWhiteSpace($prUrl)) { | ||||||||||
| Remove-Item $bodyFile -Force -ErrorAction SilentlyContinue | ||||||||||
| throw 'gh pr create failed; no PR was opened.' | ||||||||||
| } | ||||||||||
| Remove-Item $bodyFile -Force -ErrorAction SilentlyContinue | ||||||||||
| Write-Host "PR opened: $prUrl" | ||||||||||
|
tonythethompson marked this conversation as resolved.
|
||||||||||
| } | ||||||||||
| finally { | ||||||||||
| Pop-Location | ||||||||||
| } | ||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both WinGet commands appear in a single
<pre>block with no visual separator or comment, so a user scanning quickly may run both — installing the extension twice via two separate packages that share the sameAppId. The note below the snippet explains they are alternatives, but the snippet itself presents them as a sequence. Adding a comment line (e.g.# -- or --) between them, or splitting into two labelled blocks, would make the mutual-exclusivity clear at a glance.Prompt To Fix With AI
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!