Skip to content

fix: stop reading the removed org commits flag in the current user - #1577

Closed
WendellAdriel wants to merge 2 commits into
dev-null-sh:productionfrom
WendellAdriel:fix/current-user-org-flag
Closed

WendellAdriel wants to merge 2 commits into
dev-null-sh:productionfrom
WendellAdriel:fix/current-user-org-flag

Conversation

@WendellAdriel

@WendellAdriel WendellAdriel commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

#1492 merged after the organization commits flag was removed in 6e71709, so GET /api/v1/me throws on the missing Feature::OrganizationCommits and production CI fails.

Posting as an organization is always on now, so can_post_as_organization is always true, and the tests that switched the flag are gone. This also applies Pint's mb_ltrim fix to GitHubReadmeQuery, which fails lint on production too.

Summary by CodeRabbit

  • Bug Fixes
    • Relative README image links now handle leading Unicode whitespace correctly.
  • Updates
    • The current-user response now consistently reports organization posting as available, regardless of the previous feature setting.

@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The current-user response now always sets can_post_as_organization to true. Relative README image paths now use Unicode-aware trimming for leading whitespace.

Changes: Organization posting capability

Layer / File(s) Summary
Current-user capability response
app/Http/Resources/CurrentUserResource.php, tests/Feature/Controllers/Api/CurrentUserControllerTest.php
The resource now reports can_post_as_organization as true without checking the feature flag. Tests expect true and no longer cover the feature-disabled response.

README relative image paths

Layer / File(s) Summary
Trim relative image paths
app/Queries/GitHubReadmeQuery.php
Relative image paths now use mb_ltrim instead of ltrim after leading ./ prefixes are removed.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: yeapea, simonhamp

Merge Risk: Minimal · up to 37153

The change fixes the current-user endpoint, which referenced a removed feature flag, and updates README image path trimming. No actionable merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: the current-user endpoint no longer reads the removed org commits feature flag. The PR also applies an mb_ltrim lint fix in GitHubReadmeQuery, which the title does not…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: the current-user endpoint no longer reads the removed org commits feature flag. The PR also applies an mb_ltrim lint fix in GitHubReadmeQuery, which the title does not mention. That secondary change is minor and does not make the title misleading.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 560d6979-6be9-4424-8115-a32e33e12a10
Commits

Reviewing files that changed from the base of the PR and between 3a0981b and 371535b.

Files selected for processing: 3

  • app/Http/Resources/CurrentUserResource.php
  • app/Queries/GitHubReadmeQuery.php
  • tests/Feature/Controllers/Api/CurrentUserControllerTest.php

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.

@nunomaduro

Copy link
Copy Markdown
Member

this hsould be solve.d

@nunomaduro nunomaduro closed this Nov 14, 2026
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