Skip to content

Change that fixes issue 92 - #131

Merged
isaac-rtc merged 2 commits into
devfrom
DSACMS/isaac/issues-92-topics-override
Jul 22, 2026
Merged

Change that fixes issue 92#131
isaac-rtc merged 2 commits into
devfrom
DSACMS/isaac/issues-92-topics-override

Conversation

@isaac-rtc

@isaac-rtc isaac-rtc commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Problem

Repository tags generated from GitHub topics were overwriting the existing tags field in code.json.

This caused any tags that had been manually added to code.json (but did not exist as GitHub repository topics) to be removed the next time the metadata generator ran. As a result, custom tags such as featured would be lost in future generated PRs.

Solution

Added a mergeTags helper that combines the detected GitHub repository topics with the existing code.json tags while removing duplicates.

Instead of replacing the existing tags when repository topics are present, the metadata generator now merges both sources, preserving manually added tags while still including the repository topics.

Tests

Added unit tests covering the new merge behavior:

  • Preserves existing tags that are not repository topics

    • Verifies that tags present only in code.json are retained after metadata generation.
  • Does not duplicate tags that already exist as repository topics

    • Verifies that tags appearing in both GitHub repository topics and code.json are included only once.
  • Uses repository topics when no existing code.json is present

    • Verifies that repositories without an existing code.json continue to use the detected GitHub repository topics as before.

    Closes Metadata: Preserve tags that are not repo topics by adding as repo topics #92

@isaac-rtc isaac-rtc changed the title Dsacms/isaac/issues 92 topics override Change that fixes issue 92 Jul 17, 2026
@isaac-rtc
isaac-rtc requested a review from sachin-panayil July 17, 2026 20:07

@sachin-panayil sachin-panayil left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

great work! exactly what the ticket asked for an in a efficient way

Comment thread src/helper.ts
@isaac-rtc
isaac-rtc merged commit 6619a9d into dev Jul 22, 2026
5 checks passed
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.

Metadata: Preserve tags that are not repo topics by adding as repo topics

2 participants