-
Couldn't load subscription status.
- Fork 11
feat: name package with PR number #980
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
WalkthroughThe Changes
Possibly related PRs
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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: 0
🧹 Outside diff range and nitpick comments (1)
plugin/source/dynamix.unraid.net/pkg_build.sh (1)
Line range hint
64-73: Consider adding PR number validation and URL constants.The URL handling logic is correct and properly differentiates between PR, staging, and production environments. However, consider these improvements:
- Add PR number validation to ensure it's a valid number
- Define base URLs as constants at the top of the script for easier maintenance
Here's a suggested improvement:
#!/bin/bash +# Base URLs for different environments +STABLE_BASE_URL="https://stable.dl.unraid.net/unraid-api" +PREVIEW_BASE_URL="https://preview.dl.unraid.net/unraid-api" + # passes `shellcheck` and `shfmt -i 2` [[ "$1" == "s" ]] && env=staging [[ "$1" == "p" ]] && env=production [[ -z "${env}" ]] && echo "usage: [s|p]" && exit 1 # If we have a second parameter, it's the PR number (for Pull request builds) -[[ -n "$2" ]] && PR="$2" || PR="" +if [[ -n "$2" ]]; then + if [[ "$2" =~ ^[0-9]+$ ]]; then + PR="$2" + else + echo "Error: PR number must be numeric" + exit 1 + fi +else + PR="" +fi
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro (Legacy)
📒 Files selected for processing (1)
plugin/source/dynamix.unraid.net/pkg_build.sh(1 hunks)
🔇 Additional comments (2)
plugin/source/dynamix.unraid.net/pkg_build.sh (2)
38-38: LGTM! Good spacing.
The added empty line improves code readability by separating logical blocks.
27-32: LGTM! Verify the PR number handling.
The new conditional block correctly prioritizes PR number handling over staging environment, with proper path updates and README modifications.
Let's verify the directory structure and file modifications:
✅ Verification successful
LGTM! The PR number handling is correctly implemented.
The code correctly handles PR builds by:
- Moving and renaming the plugin directory to
.stagingsuffix - Properly updating the README.md title with PR number
- Correctly modifying Connect.page references
- Using appropriate preview URLs for PR builds
- Maintaining proper validation of all required entities
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Verify the plugin directory structure and naming
fd -t d "dynamix.unraid.net" -x echo "Directory found: {}"
# Verify README.md and Connect.page modifications
rg -l "dynamix.unraid.net.(staging|plg)" --type txt
Length of output: 409
Script:
#!/bin/bash
# Check for Connect.page file
fd "Connect.page" -x echo "Found Connect.page at: {}"
# Check content of Connect.page and README.md
fd -e page -e md -p "dynamix.unraid.net" -x cat {}
# Check the pkg_build.sh script itself
cat plugin/source/dynamix.unraid.net/pkg_build.sh
Length of output: 45682
|
This plugin has been deployed to Cloudflare R2 and is available for testing. |
Summary by CodeRabbit
New Features
Bug Fixes