You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
chore(qodo): disable in progress notification in v0.3 - #11928
Why: The suggestion correctly identifies the removal of the /review command, a significant change to the tool's functionality, and rightly asks for verification.
Refactor the update method to eliminate duplicated code by using a single query builder and conditionally applying whereInIds or where based on the criteria type.
update<Entity extends ObjectLiteral>(
target: EntityTarget<Entity>,
criteria:
| string
| string[]
| number
| number[]
| Date
| Date[]
| ObjectId
| ObjectId[]
| any,
partialEntity: QueryDeepPartialEntity<Entity>,
options?: UpdateOptions,
): Promise<UpdateResult> {
// if user passed empty criteria or empty list of criterias, then throw an error
if (OrmUtils.isCriteriaNullOrEmpty(criteria)) {
return Promise.reject(
new TypeORMError(
`Empty criteria(s) are not allowed for the update method.`,
),
)
}
+ const qb = this.createQueryBuilder().update(target).set(partialEntity)+
if (OrmUtils.isPrimitiveCriteria(criteria)) {
- const qb = this.createQueryBuilder()- .update(target)- .set(partialEntity)- .whereInIds(criteria)+ qb.whereInIds(criteria)+ } else {+ qb.where(criteria)+ }- if (options?.returning !== undefined) {- qb.returning(options.returning)- }+ if (options?.returning !== undefined) {+ qb.returning(options.returning)+ }- return qb.execute()- } else {- const qb = this.createQueryBuilder()- .update(target)- .set(partialEntity)- .where(criteria)-- if (options?.returning !== undefined) {- qb.returning(options.returning)- }-- return qb.execute()- }+ return qb.execute()
}
Suggestion importance[1-10]: 6
__
Why: The suggestion correctly identifies and resolves code duplication in the update method by refactoring it to use a single query builder, which improves code maintainability and readability.
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Updates TypeORM’s v0.3 docs and PR-agent configuration by linking QueryRunner API docs and adjusting PR-agent output/commands (including disabling progress output).
Changes:
Add a link from the QueryRunner docs page to the full QueryRunner API documentation.
Update .pr_agent.toml to change the default PR command and disable progress/auto-checks feedback output.
Reviewed changes
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
File
Description
docs/docs/query-runner.md
Adds a pointer to the full QueryRunner API documentation.
.pr_agent.toml
Tweaks PR-agent commands and disables progress/auto-checks feedback output.
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
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.
Description of change
Disabled in progress notification in Qodo's agent and also enabled CI failure checks message.
Pull-Request Checklist
masterbranchFixes #00000tests/**.test.ts)docs/docs/**.md)