Skip to content

refactor(release): Extract gh-pages file manipulation code into a tested class#470

Merged
dazuma merged 1 commit intomainfrom
pr/gh-pages-class
Mar 20, 2026
Merged

refactor(release): Extract gh-pages file manipulation code into a tested class#470
dazuma merged 1 commit intomainfrom
pr/gh-pages-class

Conversation

@dazuma
Copy link
Owner

@dazuma dazuma commented Mar 20, 2026

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors gh-pages generation and update behavior by extracting the file manipulation logic into a dedicated Toys::Release::GhPagesLogic class and adding a comprehensive test suite around it, reducing duplication across the release tooling.

Changes:

  • Introduces Toys::Release::GhPagesLogic to encapsulate gh-pages scaffolding generation, v0 directory cleanup, and version-page updates.
  • Updates gen-gh-pages tool and the release PUSH_GH_PAGES step to use the new logic class instead of inline file operations.
  • Adds a new Minitest suite validating generated content, callbacks/results behavior, and update behavior.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
toys-release/toys/gen-gh-pages.rb Switches gh-pages generation to use GhPagesLogic for cleanup and scaffold creation.
toys-release/toys/.lib/toys/release/gh_pages_logic.rb New class containing gh-pages generation and update logic.
toys-release/toys/.lib/toys/release/steps.rb Uses GhPagesLogic#update_version_pages during gh-pages publication.
toys-release/toys/.test/test_gh_pages_logic.rb New tests covering generation, cleanup, and version update behaviors.
toys-release/toys/.test/helper.rb Loads gh_pages_logic for the test suite.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dazuma dazuma force-pushed the pr/gh-pages-class branch from 28532b1 to 5f68c83 Compare March 20, 2026 19:44
@dazuma dazuma force-pushed the pr/gh-pages-class branch from 5f68c83 to c419a6c Compare March 20, 2026 19:48
@dazuma dazuma merged commit 2c63faa into main Mar 20, 2026
15 checks passed
@dazuma dazuma deleted the pr/gh-pages-class branch March 20, 2026 19:51
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.

2 participants