Skip to content

v0.22.0

Latest

Choose a tag to compare

@kevin-lee kevin-lee released this 05 Dec 03:26
· 1 commit to main since this release
v0.22.0

0.22.0 - 2026-12-05

Fixed

  • publishToGitHubPages fails with "request timed out" (422) when the site has many files (#290)

    publishToGitHubPages sent all the files of the site in one GitHub "Create a tree" request. For a large site, GitHub timed out and returned 422.

    Now the plugin builds the Git tree incrementally, as GitHub suggests. It sends the files in batches.

    • The first batch has no base_tree, so the new tree still replaces the whole content of the GitHub Pages branch. Deleted files are removed.
    • Each later batch uses the tree from the batch before it as its base_tree.
    • The commit uses the last tree.

    Two new settings control the batch size:

    Setting key Default Description
    gitHubPagesPublishTreeBatchMaxEntries 500 The max number of files in one "Create a tree" request
    gitHubPagesPublishTreeBatchMaxBytes 1048576 The max size in bytes of the JSON body of one "Create a tree" request. A file that does not fit is sent alone.

    If GitHub still says the request timed out, set smaller values for these settings.

  • publishToGitHubPages ignored gitHubPagesGitHubBaseUrl and gitHubPagesGitHubHeaders when it checked the GitHub Pages branch (#291)

    The branch check always called https://api.github.com/. So with GitHub Enterprise, the plugin reported that the GitHub Pages branch did not exist. Now the branch check uses the same GitHub API settings as the rest of publishToGitHubPages.

Internal

  • Add tests for publishToGitHubPages against a local fake GitHub API server (#291)
    • Unit tests for commitAndPush0, which cover the batches, the base_tree chain and the 422 failure from #290.
    • New scripted tests sbt-1-publish and sbt-2-publish. They run publishToGitHubPages with custom batch settings and send no request to GitHub.

What's Changed

Full Changelog: v0.21.0...v0.22.0