Skip to content

Conversation

@kkartunov
Copy link
Contributor

filters: &filters-dev
branches:
only: ["develop"]
only: ["develop", "pm-2917"]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[⚠️ maintainability]
Adding the branch pm-2917 to the develop branch filter may be intentional for testing purposes, but ensure this is not left in production configurations if it's meant for temporary use. Consider documenting the purpose of this branch inclusion elsewhere if it's part of a longer-term strategy.


// If current reviewer is a member review, allow selecting phases even if already assigned to others.
// Only exclude assigned phases for ai reviewers.
if (!!reviewer.isMemberReview && assignedPhaseIds.has(phase.phaseId || phase.id) && !isCurrentlySelected) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[💡 style]
The condition !!reviewer.isMemberReview is redundant because isMemberReview is already a boolean. Consider simplifying it to reviewer.isMemberReview.


// If current reviewer is a member review, allow selecting phases even if already assigned to others.
// Only exclude assigned phases for ai reviewers.
if (!!reviewer.isMemberReview && assignedPhaseIds.has(phase.phaseId || phase.id) && !isCurrentlySelected) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[⚠️ correctness]
The logic here seems to be excluding phases already assigned to other reviewers only for AI reviewers. This could lead to unexpected behavior if a member reviewer is mistakenly flagged as an AI reviewer. Ensure that isMemberReview is correctly set for all reviewers.


if (challenge.reviewers && Array.isArray(challenge.reviewers)) {
challenge.reviewers = challenge.reviewers.map(reviewer => {
if (reviewer.isMemberReview === false) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[💡 style]
The condition reviewer.isMemberReview === false is explicitly checking for false. Consider using a more concise check like !reviewer.isMemberReview unless you specifically need to distinguish between false and undefined.

console.error('An unexpected error occurred while getting auth token')
}
const errorMessage = error && error.message ? error.message : error
console.error('An unexpected error occurred while getting auth token', errorMessage)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[⚠️ maintainability]
Consider logging the entire error object instead of just the message. This can provide more context for debugging, such as stack traces or additional properties that might be present on the error object.

@kkartunov kkartunov merged commit 711bab7 into master Dec 2, 2025
13 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.

4 participants