Skip to content

Move vendored assets to Git Submodules and .gitignore built assets #2052

Description

@achrinza

The website has scripts which pulls data from GitHub and NPM:

  • update-blog.sh
    Clones loopbackio/loopback-blog into /blog
  • update-readmes.sh
    Downloads READMEs from GitHub "raw" or NPM Registry into /doc/en/[lb3|lb4|community]/readmes
  • update-lb4-docs.js
    Copies pre-generated markdown API Docs from @loopback/docs into /doc/en/lb4

They pose some issues:

  • Accidental manual editing: Contributors may accidentally contribute changes to these assets, only to be overridden by the CI pipeline.
  • Rate-limitng: Contributors running npm run build -> update-readmes.sh may inadvertently update the local copies with GitHub "rate limit reached" error pages.
  • Unclear provenance: As the .git directory is not preserved, the provenance of where and when exactly the assets were vendored is no clear.
  • Updates are reactive: The assets are only re-vendored when a PR is merged.

Git Submodules solve this problem. Updates would be handled by Renovate instead, which would open PRs.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions