Skip to content

Move GitLab MR write-back out of app/nodes/publish_findings/node.py #869

@VaibhavUpreti

Description

@VaibhavUpreti

Why This Matters

the publish node is currently doing rendering, ingest, Slack, Discord, Telegram, and GitLab MR note posting all in one file.

Read First

  • app/nodes/publish_findings/node.py
  • app/integrations/gitlab.py

Scope

  1. Extract the GitLab MR write-back branch into one helper module under the publish_findings package or a delivery utility module.
  2. Move _build_mr_note() with it unless a better home is obvious.
  3. Keep the GITLAB_MR_WRITEBACK env-flag behavior unchanged.

Tests / Coverage

  • relocate the existing GitLab note tests into tests/nodes/publish_findings/
  • add one test for env flag off
  • add one test for MR IID missing
  • add one test for write-back failure not crashing the report flow

Acceptance Criteria

  • the publish node calls a small GitLab helper instead of inlining the branch
  • behavior and env gating remain unchanged
  • the helper has direct tests

Metadata

Metadata

Assignees

Labels

maintainabilityImproves long-term code maintainabilityrefactorCodebase cleanup without behavior change

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions