Skip to content

Add automation for test-plan sub-issues on Epic and Story issues #16310

@yusufttur

Description

@yusufttur

Technical TODO

Summary

Add an automation that creates and maintains a test-plan issue as a sub-issue when a dedicated trigger label is added to a parent issue.

Supported parent issue types:

  • Epic
  • Story

Scope

  • Triggered by a dedicated label on the parent issue
  • Test-plan issue is created in the same repository as the parent issue
  • Only one test-plan issue may exist per parent issue
  • Child issue has no dedicated label
  • Child issue identity is tracked via a hidden body marker

Marker

Each generated test-plan issue should contain this hidden marker in its body:

<!-- test-plan-for: owner/repo#1234 -->

Example:

<!-- test-plan-for: shopware/SwagCommercial#456 -->

Expected Behavior

Label added

When the trigger label is added to an issue of type Epic or Story:

  1. Look up an existing test-plan issue in the same repository using the marker.
  2. If no matching issue exists:
  • create a new test-plan issue
  • add the marker to the issue body
  • link it as a sub-issue of the parent
  1. If a matching issue already exists:
  • reuse it
  • reopen it if it is closed
  • ensure it is linked as a sub-issue
  1. If multiple matching issues exist:
  • do not create another issue
  • report the conflict for manual cleanup

Label removed

When the trigger label is removed from the parent issue:

  1. Look up the existing test-plan issue by marker.
  • If found:
  • close it
  • do not delete it
  • keep the sub-issue link intact
  1. If not found:
  • do nothing

Relabel

When the trigger label is added again later:

  1. Look up the existing test-plan issue by marker.
  2. If found:
  • reopen it if closed
  • reuse it
  • ensure it is linked as a sub-issue
  1. If not found:
  • create a new one

Non-goals

  • Delete test-plan issues automatically
  • Add a dedicated label to the child issue
  • Synchronize child title/body after creation
  • Support parent issue types other than Epic and Story
  • Add scheduled reconciliation in the first iteration

Edge cases

  • Label added multiple times
  • Label removed and added again
  • Existing child issue already present
  • Existing child issue closed
  • Existing child issue manually unlinked
  • Existing child issue manually deleted
  • Duplicate child issues found for the same parent
  • Label added to unsupported issue type

Acceptance criteria

  • Adding the trigger label to an Epic or Story creates exactly one test-plan sub-issue if none exists
  • Adding the trigger label again does not create duplicates
  • Removing the trigger label closes the existing test-plan issue
  • Removing the trigger label does not delete the test-plan issue
  • Re-adding the trigger label reopens and reuses the existing test-plan issue
  • The child remains linked as a sub-issue after unlabeling
  • Multiple matching children are detected and reported instead of creating more
  • Unsupported parent issue types do not create a test-plan issue

Metadata

Metadata

Labels

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions