Cloudsmith io/shivani generic upstream GitHub releases#379
Conversation
|
@ssoni-cloudsmith is attempting to deploy a commit to the Cloudsmith Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Pull request overview
Adds documentation/examples for using Generic upstream proxying with GitHub Releases and updates the site’s table component styling to better handle long strings/URLs in table cells.
Changes:
- Replaces a single “Example” section with an “Examples” section and adds a new GitHub Releases example to the Generic repository docs.
- Updates the
Tablecomponent to wrap tables in a horizontally scrollable container. - Adjusts table CSS to improve wrapping behavior for long content (including inline
code) inside table cells.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/content/formats/generic-repository.mdx | Adds a GitHub Releases upstream example alongside the existing Node.js example. |
| src/components/Table/Table.tsx | Wraps rendered tables with a container to enable horizontal scrolling. |
| src/components/Table/Table.module.css | Adds overflow container styling and improves long-string wrapping in table cells/code. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - **Upstream URL**: `https://api.github.com/repos/<owner>/<repo>/releases` | ||
| - **Upstream Prefix**: `github_releases` | ||
|
|
||
| **How paths are resolved:** | ||
|
|
||
| The upstream URL includes the base path (`/releases/`), so file paths are relative to that location. | ||
| To download `https://github.com/aquasecurity/trivy/releases/download/v0.69.3/trivy_0.69.3_Linux-ARM64.tar.gz`, request the path `v0.69.3/trivy_0.69.3_Linux-ARM64.tar.gz` from Cloudsmith: | ||
|
|
||
| | Component | Value | | ||
| | :-------- | :---- | | ||
| | Upstream URL | `https://api.github.com/repos/aquasecurity/trivy/releases` | | ||
| | File path on upstream | `v0.69.3/trivy_0.69.3_Linux-ARM64.tar.gz` | | ||
| | Full upstream URL | `https://api.github.com/repos/aquasecurity/trivy/releases/v0.69.3/trivy_0.69.3_Linux-ARM64.tar.gz` | |
There was a problem hiding this comment.
The GitHub Releases example currently uses the GitHub API endpoint (https://api.github.com/repos/.../releases) as the upstream base, but release assets are not downloadable by appending /<tag>/<asset> to that API URL (the endpoint returns JSON and .../releases/v0.x/... will 404). Update the example to use a download-able base URL (e.g., https://github.com/<owner>/<repo>/releases/download/) and adjust the “Full upstream URL” row/path explanation accordingly so the resolved URL matches the actual asset URL format (.../releases/download/<tag>/<asset>).
| - **Upstream URL**: `https://api.github.com/repos/<owner>/<repo>/releases` | |
| - **Upstream Prefix**: `github_releases` | |
| **How paths are resolved:** | |
| The upstream URL includes the base path (`/releases/`), so file paths are relative to that location. | |
| To download `https://github.com/aquasecurity/trivy/releases/download/v0.69.3/trivy_0.69.3_Linux-ARM64.tar.gz`, request the path `v0.69.3/trivy_0.69.3_Linux-ARM64.tar.gz` from Cloudsmith: | |
| | Component | Value | | |
| | :-------- | :---- | | |
| | Upstream URL | `https://api.github.com/repos/aquasecurity/trivy/releases` | | |
| | File path on upstream | `v0.69.3/trivy_0.69.3_Linux-ARM64.tar.gz` | | |
| | Full upstream URL | `https://api.github.com/repos/aquasecurity/trivy/releases/v0.69.3/trivy_0.69.3_Linux-ARM64.tar.gz` | | |
| - **Upstream URL**: `https://github.com/<owner>/<repo>/releases/download/` | |
| - **Upstream Prefix**: `github_releases` | |
| **How paths are resolved:** | |
| The upstream URL includes the base path (`/releases/download/`), so file paths are appended after that location. | |
| To download `https://github.com/aquasecurity/trivy/releases/download/v0.69.3/trivy_0.69.3_Linux-ARM64.tar.gz`, request the path `v0.69.3/trivy_0.69.3_Linux-ARM64.tar.gz` from Cloudsmith: | |
| | Component | Value | | |
| | :-------- | :---- | | |
| | Upstream URL | `https://github.com/aquasecurity/trivy/releases/download/` | | |
| | File path on upstream | `v0.69.3/trivy_0.69.3_Linux-ARM64.tar.gz` | | |
| | Full upstream URL | `https://github.com/aquasecurity/trivy/releases/download/v0.69.3/trivy_0.69.3_Linux-ARM64.tar.gz` | |
|
|
||
| The upstream prefix (`node_distributions`) ensures files from Node.js don't collide with files from other upstreams, even if they share identical file paths. | ||
|
|
||
| #### Github Releases |
There was a problem hiding this comment.
Heading uses "Github" here, but elsewhere in this doc (and generally) the brand is styled as "GitHub". Please rename this heading to "GitHub Releases" for consistency.
| #### Github Releases | |
| #### GitHub Releases |
| export function Table(props: React.ComponentPropsWithoutRef<'table'>) { | ||
| return <table className={styles.root} {...props} />; | ||
| return ( | ||
| <div className={styles.container}> |
There was a problem hiding this comment.
The new scroll container enables horizontal scrolling, but a plain <div> with overflow-x: auto isn’t keyboard-focusable by default, which makes horizontal scrolling difficult for keyboard-only users. Consider making the container focusable (e.g., tabIndex={0}) and giving it an accessible name (via aria-label/aria-labelledby, potentially reusing the table’s labeling props) so assistive tech users can discover and operate the scroll region.
| <div className={styles.container}> | |
| <div | |
| className={styles.container} | |
| tabIndex={0} | |
| aria-label={props['aria-label']} | |
| aria-labelledby={props['aria-labelledby']} | |
| > |
No description provided.