-
-
Notifications
You must be signed in to change notification settings - Fork 378
Update default plugin publish to follow production version #3656
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
Conversation
🥷 Code experts: no user but you matched threshold 10 jjw24 has most 🧠 knowledge in the files. See details
Knowledge based on git-blame: To learn more about /:\ gitStream - Visit our Docs |
Be a legend 🏆 by adding a before and after screenshot of the changes you made, especially if they are around UI/UX. |
@check-spelling-bot Report🔴 Please reviewSee the 📂 files view, the 📜action log, or 📝 job summary for details.
See ❌ Event descriptions for more information. If the flagged items are 🤯 false positivesIf items relate to a ...
|
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.
Pull Request Overview
This PR updates the default plugins workflow to align plugin JSON versions with the production release version and simplifies the publish job by removing per-plugin change filters.
- Remove
paths-filter
step and per-pluginif
conditions to always publish all default plugins. - Add a PowerShell step to extract the version from
appveyor.yml
and update everyplugin.json
to that version. - Rename the job from
build
topublish
and drop the branch path filter.
Comments suppressed due to low confidence (1)
.github/workflows/default_plugins.yml:30
- [nitpick] PowerShell conventions favor camelCase variable names. Rename
$plugin_old_ver
and$plugin_new_ver
to$pluginOldVersion
and$pluginNewVersion
for consistency.
$plugin_old_ver = Get-Content $file.FullName -Raw | ConvertFrom-Json
📝 WalkthroughWalkthroughThe GitHub Actions workflow for publishing default plugins was updated to remove conditional steps based on file changes. Now, all plugins are always built and published, and their version fields are updated to match the version in Changes
Sequence Diagram(s)sequenceDiagram
participant Developer
participant GitHub Actions
participant PowerShell Script
Developer->>GitHub Actions: Push to repository
GitHub Actions->>PowerShell Script: Run version update script
PowerShell Script->>GitHub Actions: Update all plugin.json versions
GitHub Actions->>GitHub Actions: Build all plugins
GitHub Actions->>GitHub Actions: Publish all plugins
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/default_plugins.yml (1)
28-34
: Use JSON property action instead of inline regex
Manually replacing JSON via regex is error-prone. Since you already usenotiz-dev/github-action-json-property
later, consider updating all plugin versions in one step:- name: Update all plugin.json versions uses: notiz-dev/github-action-json-property@release with: path: "./Plugins/**/plugin.json" prop_path: Version prop_value: "${{ steps.read-version.outputs.version }}"This ensures valid JSON updates and simplifies the workflow.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/default_plugins.yml
(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (5)
- GitHub Check: gitStream workflow automation
- GitHub Check: gitStream.cm
- GitHub Check: gitStream.cm
- GitHub Check: gitStream.cm
- GitHub Check: build
🔇 Additional comments (1)
.github/workflows/default_plugins.yml (1)
9-9
: Approve renaming job frombuild
topublish
The new job name more accurately describes its function.
- name: Update Plugins To Production Version | ||
run: | | ||
$version = "1.0.0" | ||
Get-Content appveyor.yml | ForEach-Object { | ||
if ($_ -match "version:\s*'(\d+\.\d+\.\d+)\.") { | ||
$version = $matches[1] | ||
} | ||
} | ||
|
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.
Fix PowerShell regex for version extraction
The current pattern "version:\s*'(\d+\.\d+\.\d+)\."
requires a trailing dot after the version and will not match lines like version: '1.20.0'
. Adjust it to:
- Get-Content appveyor.yml | ForEach-Object {
- if ($_ -match "version:\s*'(\d+\.\d+\.\d+)\.") {
- $version = $matches[1]
- }
- }
+ Get-Content appveyor.yml | ForEach-Object {
+ if ($_ -match "version:\s*'(\d+\.\d+\.\d+)'") {
+ $version = $matches[1]
+ }
+ }
Using a YAML parser or dedicated action would be more robust.
🤖 Prompt for AI Agents
In .github/workflows/default_plugins.yml around lines 19 to 27, the PowerShell
regex used to extract the version number incorrectly expects a trailing dot
after the version string, causing it to miss valid versions like '1.20.0'.
Update the regex pattern to remove the trailing dot requirement so it matches
the full version string correctly. Consider using a YAML parser or a dedicated
GitHub Action for more reliable version extraction.
Update default plugin publish action to follow production version
This is already run, so it's tested working. For example https://github.com/Flow-Launcher/Flow.Launcher.Plugin.WindowsSettings/releases/tag/v1.20.0