Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove edit button only for terraform enterprise (#2564)
* Simplify isPublicContentRepo expression Since `isHcp` and `isSentinel` aren't used elsewhere, this expression can be simplified down to a one-liner Co-authored-by: Heat Hamilton <[email protected]> * Use URL to detect terraform enterprise This will hide the "Edit on GitHub" link for terraform enterprise only * Move PTFE detection logic from server.ts to loader * Move private repo logic from server.ts to loader Since logic was implemented in the loader to hide the "Edit this page on GitHub" link for PTFE, it makes sense to move the other (similar) logic there too to keep everything together. Additionally, this also allows the expression to be cleaned up to use `this.opts.product` and `Array.includes()` to detect private repos. --------- Co-authored-by: Heat Hamilton <[email protected]>
- Loading branch information