Skip to content

✨ Category Sync - Auto-update category index when rule category changes #2473

@Aibono1225

Description

@Aibono1225

Requested by: @Aibono1225 via YakShaver.ai 🦬
cc: @Aibono1225, @Marxoz, @PothieuG, @Freego1783, @andrewwaltosssw

Hi Team!

  🟥  Watch the video (2 min 6 sec)

  Url from screen share: https://github.com/SSWConsulting/SSW.Rules.Content/wiki/How-to-Create-Rules

Pain

In Rules V3 (TinaCMS), adding or updating a rule category via manual GitHub edits can result in the rule not appearing on the Categories page if the corresponding category index MDX file is not updated. Implement a GitHub workflow in the rules content repository that detects changes to a rule’s category and ensures the related category index MDX is updated automatically or fails the check with a clear message.

Acceptance Criteria

  1. A GitHub workflow runs on pull requests that modify rule MDX files in the Rules V3 (TinaCMS) repository.
  2. The workflow detects when a rule’s category field is added or changed.
  3. The workflow verifies that the corresponding category index MDX file has been updated accordingly.
  4. If the category index MDX file is missing or outdated, the workflow automatically updates it OR fails the check with a clear, actionable error message (as per implementation decision).
  5. Rules with valid and synchronized category index updates appear correctly on the Categories page after merge.

Screenshot

Screenshot
Figure: New rule missing category index update, preventing it from appearing in categories

Metadata

Metadata

Labels

01-smallLess than 1 dayType: DevOpsSetting up of DevOps processes e.g. GitHub Actions, Azure DevOps Pipelines etcYakShaver

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions