Skip to content

Conversation

@adamziel
Copy link
Collaborator

@adamziel adamziel commented Dec 9, 2025

Summary

github-proxy.com is being shut down. This PR provides a graceful migration path for existing Blueprints that reference github-proxy.com URLs.

When a Blueprint contains a URL resource pointing to github-proxy.com, it is now automatically rewritten to native Blueprint resources with a console warning prompting users to update their Blueprints.

Migration mapping

github-proxy.com pattern Migrates to
?repo=owner/name zip wrapping git:directory at HEAD
?repo=...&branch=trunk zip wrapping git:directory with branch ref
?repo=...&pr=123 zip wrapping git:directory with refs/pull/123/head
?repo=...&commit=abc zip wrapping git:directory with commit ref
?repo=...&release=v1.0 zip wrapping git:directory with tag ref
?repo=...&directory=subdir zip wrapping git:directory with path
?repo=...&release=v1.0&asset=file.zip url to GitHub releases download
?repo=...&release=latest&asset=file.zip url to GitHub /releases/latest/download/
https://github-proxy.com/https://... url with the inner GitHub URL

New zip resource type

A new resource type that wraps file or directory resources and outputs them as ZIP files. This maintains semantic compatibility with github-proxy.com which always returned ZIP files.

{
  "resource": "zip",
  "inner": {
    "resource": "git:directory",
    "url": "https://github.com/owner/repo",
    "ref": "main"
  }
}

Other changes

  • Fixed ZIP encoding to use 0-based disk numbering (was causing PHP's ZipArchive to reject files with "multi-disk archive" error)
  • Updated documentation to use git:directory instead of github-proxy.com examples
  • The /proxy redirect now points to the resources documentation
  • Local dev server now proxies /cors-proxy/ requests through Vite to avoid Chrome's Private Network Access restrictions

Test plan

Run npm run dev locally and click through each link below. They should all load successfully and show a deprecation warning in the console.

Real-world Blueprints using github-proxy.com

Here's a few blueprints actually used out in the wild containing references to github-proxy.com that now work without requesting github-proxy.com (all links lead to local playground):

Manual verification

  • Each blueprint above loads successfully
  • Console shows deprecation warning: [Blueprints] github-proxy.com is deprecated...
  • Verify the zip resource type works with installPlugin and installTheme steps
  • Check that existing git:directory resources still work as expected

@adamziel adamziel marked this pull request as draft December 9, 2025 19:32
github-proxy.com is being shut down. This change provides a graceful
migration path for existing Blueprints that reference github-proxy.com
URLs.

When a Blueprint contains a URL resource pointing to github-proxy.com,
it is now automatically rewritten to native Blueprint resources:

- Repository URLs (?repo=...) become `zip` wrapping `git:directory`
- Branch/PR/commit/release parameters map to git refs
- Release assets (?release=...&asset=...) become direct GitHub URLs
- Proxied GitHub URLs are unwrapped to direct URLs

A new `zip` resource type wraps file or directory resources and outputs
them as ZIP files, maintaining semantic compatibility with github-proxy.com
which always returned ZIP files.

Also fixes ZIP encoding to use 0-based disk numbering, which was causing
PHP's ZipArchive to reject files with "multi-disk archive" error.

Documentation updated to use git:directory instead of github-proxy.com.
The /proxy redirect now points to the resources documentation.

Local dev server now proxies /cors-proxy/ requests through Vite to avoid
Chrome's Private Network Access restrictions.
Resolved conflicts in documentation files by keeping the PR's removal of
github-proxy.com deprecation notices (since this PR implements automatic
migration) while preserving other trunk updates.
…roxyUrl

The original function name was misleading - it didn't "parse" the URL, it rewrote it.
Splitting into two functions makes the intent clearer:
- isGithubProxyUrl: predicate that checks if a URL is a github-proxy.com URL
- rewriteGithubProxyUrl: rewrites the URL to a native Blueprint resource

The original parseGithubProxyUrl is kept as a deprecated alias for backwards compatibility.
@adamziel adamziel force-pushed the github-proxy-com-migration-path branch from 782c3bd to 20fba49 Compare December 12, 2025 19:50
@adamziel adamziel marked this pull request as ready for review December 12, 2025 19:58
@adamziel
Copy link
Collaborator Author

adamziel commented Dec 12, 2025

The Gatherpress link fails, something's off with Git sparse checkout.

Edit: Actually it seems like it was just my network

@adamziel adamziel marked this pull request as draft December 12, 2025 20:10
@adamziel adamziel marked this pull request as ready for review December 12, 2025 20:22
if ( str_ends_with( $requested_path, '/proxy' ) ) {
return array(
'location' => 'https://github-proxy.com/',
'location' => 'https://wordpress.github.io/wordpress-playground/blueprints/steps/resources#gitdirectoryreference',
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@brandonpayton do you remember why did we need this redirect?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants