Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contribution workflow: How to include additional files (e.g. plugin zip) in a PR? #6

Closed
adamziel opened this issue Apr 5, 2024 · 6 comments

Comments

 @adamziel
Copy link
Contributor

Contributing Guidelines say:

All static files (WXR, ZIP, JPG etc.) referenced by the Blueprint must be included in the submitted directory in your Pull Request and referenced via the raw.githubusercontent.com domain.

However, it's unclear how to actually reference these files in blueprint.json in a PR. That blueprint can ship URLs pointing to the newly proposed branch, but once that branch is merged these URLs will need to magically start pointing to trunk .

Two solutions that came to mind:

  1. CI job to rewrite the URLs. I don't like it, though. It's extra work and will make forking and adjusting these files more difficult.
  2. Support URLs relative to the Blueprint. For example { "step": "installPlugin", "pluginZipFile": "./plugin.zip" } . This would be a breaking change because relative URLs are now relative to the client site URL. Maybe that's fine, though? Or perhaps we could ship a new resource type, like "blueprint-relative-url"?

cc @bgrgicak @brandonpayton @dmsnell for ideas

 @bgrgicak
Copy link
Contributor

This would be a breaking change because relative URLs are now relative to the client site URL. Maybe that's fine, though? Or perhaps we could ship a new resource type, like "blueprint-relative-url"?

This could be confusing, relative URLs are usually tied to the site context.
Using a new resource type would help, but it still feels like a workaround.

What if blueprints accepted bas64 encoded data? This would remove the need for putting the data on a server.
Playground could use a blueprint exporter and this could support storing data using base64.

 @dmsnell
Copy link

The Playground could help some URLs by rewriting dynamically couldn't it? That is, recognize that it's a Github link, and if it's not the right rawusercontent domain then rewrite it?

This was referenced Apr 11, 2024
 @adamziel
Copy link
Contributor Author

Related: #18

 @adamziel
Copy link
Contributor Author

I went for the CI job to rewrite branch URLs to trunk URLs:

fabe4d2

Independently from that, I will explore @dmsnell 's suggestion – it resolves another important problem.

 @adamziel
Copy link
Contributor Author

To resolve this issue, we'll need to document the expected URL for all assets is the https://raw.githubusercontent.com/ URL pointing to the proposed branch.

 @adamziel
Copy link
Contributor Author

Documented in d2f9f8d

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

No branches or pull requests

3 participants