Skip to content

Feature: Add support for user-configurable egg/nests index file.#2287

Merged
notAreYouScared merged 5 commits intopelican-dev:mainfrom
JorgenVatle:make-egg-repository-configurable
Apr 20, 2026
Merged

Feature: Add support for user-configurable egg/nests index file.#2287
notAreYouScared merged 5 commits intopelican-dev:mainfrom
JorgenVatle:make-egg-repository-configurable

Conversation

@JorgenVatle
Copy link
Copy Markdown
Contributor

Bit of a feature suggestion here. Noticed the URL used to build up the list of suggested official eggs was hardcoded. This pull request moves the URL into the application config with an optional environment override.

We have a number of custom egg configs that we want to offer to our admins. Copy pasting URLs for those was getting a little tedious, especially if one is accidentally deleted and you don't have the original URL handy.

This should address that, plus open up for users to make eggs discoverable through the import menu, or limit which nests should appear in the menu.

Not sure what you have on the roadmap, but I'd be happy to work on a follow-up to this where nests can be merged with a user-provided URL instead of replaced outright.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 30, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 30, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 3204aba3-7b71-44e1-88a2-3360e64c4ae2

📥 Commits

Reviewing files that changed from the base of the PR and between 70f24f1 and 217c9be.

📒 Files selected for processing (1)
  • config/panel.php
✅ Files skipped from review due to trivial changes (1)
  • config/panel.php

📝 Walkthrough

Walkthrough

The egg index source URL is now configurable via cdn.egg_index_url (from PANEL_EGG_INDEX_URL). UpdateEggIndexCommand reads config('panel.cdn.egg_index_url') instead of a hardcoded GitHub raw URL; parsing, caching, and error handling remain unchanged.

Changes

Cohort / File(s) Summary
Configuration
config/panel.php
Added new cdn.egg_index_url configuration key populated from PANEL_EGG_INDEX_URL with a default Pelican Eggs pelican.json URL.
Command
app/Console/Commands/Egg/UpdateEggIndexCommand.php
Replaced hardcoded raw GitHub URL with config('panel.cdn.egg_index_url') as the HTTP request source; JSON parsing, index assembly, caching, and error handling unchanged.

Possibly related PRs

  • pelican-dev/panel PR 2116 — Changes the source of the eggs index and affects the eggs.index consumed by import UI/logic.
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the main change: making the egg/nests index file URL configurable instead of hardcoded.
Description check ✅ Passed The description provides relevant context about why the change was made, explains the use case, and aligns with the changeset modifications.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@JorgenVatle
Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a 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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@app/Console/Commands/Egg/UpdateEggIndexCommand.php`:
- Line 16: The UpdateEggIndexCommand currently assumes the HTTP response
assigned to $data contains a nested structure (e.g. $data['nests']) which can
throw if the JSON is malformed; validate the schema after the GET: check that
$data is an array, that 'nests' exists and is an array, and that each nest
contains an 'eggs' array with the expected keys before indexing; in the
UpdateEggIndexCommand replace direct indexing of $data['nests']/$nest['eggs']
with guarded checks (using is_array/array_key_exists or Laravel helpers like
Arr::get/data_get), log a clear error and abort or skip when the shape is
invalid, and default to an empty list to avoid breaking downstream egg
selection.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: a0c7d71a-06c8-475d-bb74-c2edb04b8b21

📥 Commits

Reviewing files that changed from the base of the PR and between b693d0e and 75640a7.

📒 Files selected for processing (2)
  • app/Console/Commands/Egg/UpdateEggIndexCommand.php
  • config/panel.php

Comment thread app/Console/Commands/Egg/UpdateEggIndexCommand.php Outdated
Comment thread app/Console/Commands/Egg/UpdateEggIndexCommand.php Outdated
Comment thread config/panel.php Outdated
@notAreYouScared notAreYouScared merged commit 06c6629 into pelican-dev:main Apr 20, 2026
17 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Apr 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants