Skip to content

Conversation

@StanBarrows
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings October 30, 2025 06:27
@StanBarrows StanBarrows merged commit cbd1177 into main Oct 30, 2025
15 checks passed
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 makes the text parameter optional in the CreateAPostInAGivenStream request class, allowing posts to be created with only a title or other content (like files or media) without requiring text content.

  • Changed the text constructor parameter from required to optional with a null default value
  • Modified defaultBody() to conditionally include text only when it has a value
  • Updated the conditional logic to use Laravel's filled() helper for consistency

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

$body = [];

if (! empty($this->title)) {
if (filled($this->title)) {
Copy link

Copilot AI Oct 30, 2025

Choose a reason for hiding this comment

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

[nitpick] Inconsistent use of conditional checks: filled() is used for title and text, but ! empty() is used for other optional fields like scheduledAt (line 88), labels (line 72), files (line 98), media (line 108), and options (line 118). Consider using filled() consistently for all nullable string and array fields to maintain a uniform code style.

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.

2 participants