Skip to content

Conversation

@NishilHoogar
Copy link
Collaborator

This PR adds a simple WP-CLI command to seed minimal demo data for the plugin. It allows developers and testers to quickly set up a working plugin instance without manually creating events or speakers.

Features:

  • Adds includes/class-wpfa-seeder.php to handle minimal demo data insertion.
  • Registers a WP-CLI command: wp wpfa seed --minimal and wp wpfa seed-minimal.
  • Creates:
  • Updates fossasia-landing.php to register the new seeder command.
  • Updates README.md with usage instructions.
  • Prepares assets/demo/ folder for future placeholder assets.

Goal: Allow quick testing of plugin functionality with tiny, decoupled sample data.

Usage:

wp wpfa seed --minimal
# or
wp wpfa seed-minimal

This PR adds a simple WP-CLI command to seed minimal demo data for the plugin.
It allows developers and testers to quickly set up a working plugin instance without manually creating events or speakers.

 Features:

- Adds `includes/class-wpfa-seeder.php` to handle minimal demo data insertion.
- Registers a WP-CLI command: `wp wpfa seed --minimal` and `wp wpfa seed-minimal`.
- Creates:
  - 1 demo event (`wpfa_event`)
  - 2 demo speakers (`wpfa_speaker`) with remote-safe placeholder images from https://via.placeholder.com/
- Updates `fossasia-landing.php` to register the new seeder command.
- Updates `README.md` with usage instructions.
- Prepares `assets/demo/` folder for future placeholder assets.

🎯 Goal: Allow quick testing of plugin functionality with tiny, decoupled sample data.

**Usage:**
```bash
wp wpfa seed --minimal
# or
wp wpfa seed-minimal
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @NishilHoogar, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@mariobehling mariobehling requested a review from Copilot October 26, 2025 18:14
Copy link

Copilot AI left a 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 introduces a WP-CLI command to seed minimal demo data for the FOSSASIA plugin, enabling quick setup for testing and development. The seeding functionality creates sample events and speakers with remote placeholder images, avoiding the need to bundle local assets.

Key changes:

  • Added new seeder class with WP-CLI command registration
  • Integrated seeder into main plugin file alongside existing CLI commands
  • Added documentation for the new seeding commands

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
fossasia-landing.php Registered new WPFA_Seeder CLI command alongside existing WPFA_CLI command
README.md Added usage documentation for the new wp wpfa seed-minimal command

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

README.md Outdated
| `[event_sessions]` | Displays event sessions with title, time, and abstract. | API endpoint or placeholder |
| `[event_schedule]` | Displays daily schedule in a table format. | API endpoint or placeholder |
<<<<<<< Updated upstream
Copy link

Copilot AI Oct 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge conflict markers were left in the file. Remove lines 102 and 187 (<<<<<<< Updated upstream and =======) along with line 203 (>>>>>>> Stashed changes) to resolve the conflict.

Suggested change
<<<<<<< Updated upstream

Copilot uses AI. Check for mistakes.
// Register WP-CLI command if in CLI context.
if ( defined( 'WP_CLI' ) && WP_CLI ) {
// Note: The user requested a new, simpler seeder. The existing one is more complex.
// We will keep both for now, but the new one will overwrite the 'wpfa seed' command.
Copy link

Copilot AI Oct 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment mentions that the new seeder will 'overwrite' the 'wpfa seed' command, but both commands are registered to different command names ('wpfa' for WPFA_CLI and the seeder registers its own subcommands). Clarify whether there's an actual command conflict or update the comment to accurately reflect that both can coexist with different subcommands.

Suggested change
// We will keep both for now, but the new one will overwrite the 'wpfa seed' command.
// We will keep both for now; both commands are registered under different command names or subcommands, so they can coexist without conflict.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant