Add board settings fields to board JSON responses#2788
Open
robzolkos wants to merge 1 commit intobasecamp:mainfrom
Open
Add board settings fields to board JSON responses#2788robzolkos wants to merge 1 commit intobasecamp:mainfrom
robzolkos wants to merge 1 commit intobasecamp:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds enriched board JSON responses by including public_description, public_description_html, and user_ids fields in the GET /boards/:id.json endpoint. The changes align with the existing board update API shape and add comprehensive test coverage along with updated documentation.
Changes:
- Added
public_descriptionandpublic_description_htmlfields to board show JSON responses - Added conditional
user_idsfield (only present whenall_access: false) - Added comprehensive controller tests covering the new fields and their conditional inclusion
- Updated API documentation with example response showing the new fields and conditional field behavior
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
test/controllers/boards_controller_test.rb |
Added three tests: one for public_description fields, one for user_ids when board is not all access, and one ensuring user_ids is excluded for all-access boards |
docs/API.md |
Updated board show endpoint documentation with new fields in example response and clarified conditional field behavior |
app/views/boards/show.json.jbuilder |
Added public_description, public_description_html, and conditional user_ids fields |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add board settings read parity to
GET /boards/:id.json.What changed
public_descriptionandpublic_description_htmlto board show JSONuser_idsfor boards with granular access (all_access: false)user_ids, and omission ofuser_idsfor all-access boardsdocs/API.mdto document the enriched board responseNotes
user_idsmatches the existing board update API shape and can be resolved viaGET /:account_slug/usersuser_idsis only present whenall_accessisfalse