Repository navigation
perf(stats): generate all seven cards from one dependency install - #55
Conversation
🐤 Kanarek · 🟣 merged
Kanarek · 1 files |
Reviewer's GuideThe workflow now checks out a pinned upstream renderer, prepares Node/pnpm and installs dependencies once with lockfile-backed caching, then invokes the renderer directly to generate all seven cards while preserving their options, tokens, outputs, and event restrictions; renderer errors fail the job instead of producing error-card assets. Sequence diagram for shared stats card generationsequenceDiagram
participant Workflow
participant RendererRepo
participant PnpmCache
participant Renderer
participant GitHubAPI
Workflow->>RendererRepo: checkout pinned renderer
Workflow->>PnpmCache: restore pnpm cache by pnpm-lock.yaml
Workflow->>Renderer: pnpm install --frozen-lockfile --prod --ignore-scripts
loop seven cards
Workflow->>Renderer: node index.js with card options and token
Renderer->>GitHubAPI: fetch card data
GitHubAPI-->>Renderer: card data
Renderer-->>Workflow: write SVG output
end
alt renderer API error
Renderer-->>Workflow: fail with error
Workflow-->>Workflow: stop before commit
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
There was a problem hiding this comment.
Hey - I've reviewed your changes and they look great!
Sourcery assessment
Needs a human reviewer. The shared generation step puts GH_PAT in the environment for every renderer invocation, not just the gist-card invocation, so renderer code for any card can read it. If mishandled, the token could be exposed and used before a revert; revoking or rotating it would be needed to contain that.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Addressed Sourcery's token-scope finding in dc94dfc: six public cards now render in a step with only GITHUB_TOKEN; only the separate gist step receives GH_PAT. Both reuse the same upstream checkout and dependency installation. |
The 7 individual
github-readme-stats-action@v2calls each repeat pnpm/Node setup and may reinstall the core renderer. Checkout the upstream v2.1.0 renderer once at a pinned SHA, prepare pnpm/Node once, share a lockfile-keyed pnpm cache, and generate all 7 SVGs through its unchanged entrypoint using the original options/token selection.Card generation stays restricted to
workflow_dispatch/workflow_call. The contributor-only scheduled/push path does not install Node dependencies. Use the upstream bundled core 2.2.0 and fail closed on renderer API errors rather than committing an error-card SVG.Summary by CodeRabbit