Skip to content

Release 20250519#387

Merged
d-beezee merged 4 commits intomainfrom
develop
May 19, 2025
Merged

Release 20250519#387
d-beezee merged 4 commits intomainfrom
develop

Conversation

@d-beezee
Copy link
Copy Markdown
Member

No description provided.

@d-beezee d-beezee requested a review from Copilot May 19, 2025 10:02
@github-actions
Copy link
Copy Markdown

Tests difference:

New Tests

< Route POST /dossiers - Should create a campaign with default bug types if no specific bug types are selected
< Route POST /dossiers - Should create a campaign with the specified additional fields
< Route POST /dossiers - Should create a campaign with the specified bug types
< Route POST /dossiers - Should throw an error if invalid bugtype is sent

Copy link
Copy Markdown
Contributor

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 extends the dossier creation flow to support custom additional fields and bug-type selections. It adds schema definitions, request validation, database persistence, test coverage, and updates the OpenAPI spec accordingly.

  • Introduce additionals and bugTypes in the campaign schema
  • Validate and persist additional fields & bug types in the POST /dossiers route
  • Extend tests and update OpenAPI documentation for new fields
  • Bump @appquality/tryber-database dependency

Reviewed Changes

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

Show a summary per file
File Description
src/schema.ts Added optional additionals and bugTypes arrays to campaign type
src/routes/dossiers/_post/index.ts Validate and insert additional fields and bug types
src/routes/dossiers/_post/creation.spec.ts New tests for additionals and bug types; seed and cleanup updates
src/reference/openapi.yml Document additionals and bugTypes in the OpenAPI contract
package.json Bumped @appquality/tryber-database to ^0.44.6
Comments suppressed due to low confidence (3)

src/routes/dossiers/_post/creation.spec.ts:120

  • Add cleanup for the WpAppqAdditionalBugTypes table here to ensure tests remain isolated and previous runs don't affect this suite.
await tryber.tables.WpAppqCampaignAdditionalFields.do().delete();

src/routes/dossiers/_post/index.ts:111

  • [nitpick] The method name uses a double negative (invalidBugTypesSubmitted); consider renaming to hasInvalidBugTypes or areBugTypesInvalid for clearer intent.
private async invalidBugTypesSubmitted() {

src/reference/openapi.yml:10777

  • [nitpick] This required block appears to duplicate the role/user requirement already defined earlier; consider consolidating to prevent inconsistencies in the API spec.
required:

Comment thread src/routes/dossiers/_post/creation.spec.ts
Comment thread src/routes/dossiers/_post/index.ts
@d-beezee d-beezee merged commit d3202c8 into main May 19, 2025
6 checks passed
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