Skip to content
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

Add an API endpoint to post comments to wiki requests #516

Closed

Conversation

redbluegreenhat
Copy link
Member

@redbluegreenhat redbluegreenhat commented May 2, 2024

No description provided.

@redbluegreenhat redbluegreenhat changed the title create RestWikiRequestComment Add an API endpoint to post comments to wiki requests May 2, 2024
@redbluegreenhat
Copy link
Member Author

The WikiRequest class has to be changed to take instances of classes implementing the UserIdentity interface rather than instances of User before this can be merged.

redbluegreenhat added a commit to redbluegreenhat/CreateWiki that referenced this pull request May 2, 2024
…an User directly

This change is necessary for usage with the REST API (miraheze#516)
@redbluegreenhat redbluegreenhat marked this pull request as ready for review May 2, 2024 22:38
redbluegreenhat added a commit that referenced this pull request May 2, 2024
… rather than a User directly (#517)

This change is necessary for usage with the REST API
(#516)
@redbluegreenhat
Copy link
Member Author

Just so I don't forget, one of the things blocking this is that I want to add an utility class for handling wiki request suppression, which at the very minimum should allow you to retrieve $visibilityConds, which should help reduce code duplication a bit on the REST handlers.

@redbluegreenhat redbluegreenhat marked this pull request as draft June 1, 2024 20:55
@Universal-Omega
Copy link
Member

Universal-Omega commented Oct 2, 2024

Just noting mostly to myself, after #567 the way this is done will be changed.

  • Type hint all properties and methods
  • Use WikiRequestManager service injection
  • Use WikiRequestManager->exists rather than a try-catch
  • Use WikiRequestManager::VISIBILITY_CONDS constant rather than current code duplication
  • Inject $this->config into RestUtils::checkEnv()
  • Use modern namespaces IE MediaWiki\Config\Config

@Universal-Omega
Copy link
Member

This is now being applied in #567

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants