Repository navigation
chore: allow ../assets/example.glb in issue reproducers - #4437
Merged
Merged
Conversation
Add a small cube model to the example assets and allow it in the issue code example lint, so 3D-model bugs can be reproduced with require(). Also make the import allowlist actually re-include the sanctioned assets, allow require() in TypeScript examples, and let LINT_FILE runs skip the GitHub label lookup.
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Needed for #4433: the issue bot only lets reproducers use
../assets/example.png, so bugs that need arequire()d 3D model can't pass the lint. This adds a 2.7 KB cube,example/src/assets/example.glb, and allows../assets/example.glbin the issue lint and the docs that state the rule (bug report template,REPRODUCING.md, lint README).While testing I also fixed three things in the lint.
no-restricted-importsrejected even the allowed assets, because gitignore-style negation can't re-include a file whose parent dir is excluded. TypeScript examples flagged everyrequire()asno-undef, so they now use the same rules as JS. AndLINT_FILEruns no longer call the GitHub API.The cube was generated with a short script, passes
gltf-validator(0 errors, 0 warnings), and renders as bothLocationPuckandModelLayeron an Android Debug build. On a main Release build, the #4433 reproducer rewritten torequire('../assets/example.glb')logsUnknown model file type: src_assets_exampleand draws no model.Local lint runs (
LINT_FILE, JS and TS):require('./assets/sportcar.glb')) fails.require('../assets/example.glb')passes here and fails on main.../assets/other.glb,../assets/other.png,./foo,../assets/sub/example.pngand../../src/assets/example.pngstill fail, for bothrequireandimport.importof../assets/example.png/../assets/example.glbnow passes.Checklist
CONTRIBUTING.mdyarn generatein the root folder/exampleapp./example)