Skip to content

Conversation

pavel-mikula-sonarsource
Copy link
Contributor

@pavel-mikula-sonarsource pavel-mikula-sonarsource commented Aug 8, 2025

@@ -204,7 +204,6 @@ describe('PullRequestCreated', () => {
"Invoked jira.addIssueRemoteLink('PREQ-4242'', 'https://github.com/test-owner/test-repo/pull/42', null)",
"Invoked jira.moveIssue('PREQ-4242', 'Commit', null)",
"Invoked jira.moveIssue('PREQ-4242', 'Start', null)",
"Invoked jira.assignIssueToAccount('PREQ-4242', '1234-account')",
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe it's better to add a dedicetated test "Is PREQ assignee is null"?

Copy link
Contributor Author

@pavel-mikula-sonarsource pavel-mikula-sonarsource Aug 11, 2025

Choose a reason for hiding this comment

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

Testing the crazy inner logic of NewIssueData is tested in NewIssueData.test.ts

Copy link
Contributor

@mary-georgiou-sonarsource mary-georgiou-sonarsource left a comment

Choose a reason for hiding this comment

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

Comment about addind a dedicated test

Copy link

🤖 Pull Request summary

Decouples Jira issue assignment from account-based workflow status transitions.

Separates assignment logic: Splits accountId (for workflow transitions) from assigneeId (for issue assignment)
Conditional assignment: Issue assignment now only occurs when assigneeId is present, independent of account status
PREQ project handling: External contributors to PREQ projects are no longer auto-assigned (assigneeId set to null)
Test updates: Removes expectation for automatic assignment call in one test scenario

Focus areas for review:

  • Verify the separation of workflow vs assignment logic doesn't break existing behavior
  • Confirm PREQ project assignment rules align with intended business logic
  • Check that the conditional assignment properly handles edge cases with null/undefined values

💬 Please send your feedback

Quality Gate Passed Quality Gate passed

Issues
0 New issues
1 Accepted issue

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

Copy link
Contributor

@mary-georgiou-sonarsource mary-georgiou-sonarsource left a comment

Choose a reason for hiding this comment

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

👁️ ok

@mary-georgiou-sonarsource mary-georgiou-sonarsource merged commit 9653806 into master Aug 11, 2025
6 checks passed
@mary-georgiou-sonarsource mary-georgiou-sonarsource deleted the Pavel/GHA-86-PREQ-Assignee branch August 11, 2025 13:49
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