Skip to content

refactor: reduce complexity of execute_impl in assign_github_issue_to_user.rs - #2346

Draft
github-actions[bot] wants to merge 1 commit into
mainfrom
refactor/reduce-complexity-assign-github-issue-to-user-9f34cc4bd32ebf45
Draft

github-actions[bot] wants to merge 1 commit into
mainfrom
refactor/reduce-complexity-assign-github-issue-to-user-9f34cc4bd32ebf45

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

AssignGithubIssueToUserResult::execute_impl was flagged by clippy::too_many_lines (111/100). clippy::cognitive_complexity is restriction-only on this toolchain, so line count is the proxy.

Changes (no behaviour change):

  • preflight_checks: fetches the live issue, validates capability and mutation filters, and verifies each assignee.
  • apply_assignees: sends the PATCH/POST write and logs the debug message.
  • execute_impl is now a shorter orchestrator.

Validation

  • cargo test: all pass (3408 unit tests, 19 of them for assign_github_issue; integration suites pass)
  • cargo clippy --all-targets --all-features -- -W clippy::too_many_lines: execute_impl no longer flagged (was 111/100)

Warning

Firewall blocked 2 domains

The following domains were blocked by the firewall during workflow execution:

  • releaseassets.githubusercontent.com
  • spsprodeus21.vssps.visualstudio.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "releaseassets.githubusercontent.com"
    - "spsprodeus21.vssps.visualstudio.com"

See Network Configuration for more information.

Generated by Cyclomatic Complexity Reducer · auto · 36.4 AIC · ⊞ 11.1K · ◷

…_user.rs

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

This branch has not been deployed

No deployments
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.

0 participants