Skip to content

fix: make GitHub Actions checks opt-in for outdated and update - #13259

Merged
zkochan merged 3 commits into
mainfrom
fix-13254
Jul 23, 2026
Merged

zkochan merged 3 commits into
mainfrom
fix-13254

Conversation

@zkochan

@zkochan zkochan commented Jul 23, 2026 •

Copy link
Copy Markdown
Member

Summary

Checking GitHub Actions for updates is now opt-in for every command. Neither pnpm outdated nor pnpm update — interactive or not, recursive or not — reads the workflow files unless --include-github-actions is passed or update.githubActions is set to true in pnpm-workspace.yaml.

Reading them runs git ls-remote against every repository referenced by the workflows. That reaches the network in a way pnpm cannot validate up front, and it fails wherever GitHub is not reachable the way pnpm assumes:

Both reports arrived within days of the feature shipping, and neither is fixable from pnpm's side — the environment is invisible to us until the git call already failed. Users who explicitly ask for the check are in a position to expect the network traffic; users running a read-only pnpm outdated are not.

Also in this PR:

  • pnpm outdated gained the --include-github-actions flag it was missing, so the check can be run once without editing pnpm-workspace.yaml.
  • update.githubActions: false keeps working — it is now equivalent to leaving the setting unset, so anyone who added it to silence the warnings needs no change.
  • The opt-in rule lives in one place per stack (shouldCheckGitHubActions in @pnpm/deps.github-actions, github_actions::opted_in in pacquet) and is shared by every call site, so outdated and update cannot drift apart again — which is how the interactive-update default diverged in the first place.

Discoverability is deliberately left to the docs and release notes for now; nothing in the CLI advertises the feature when it is off.

Closes #13254

Squash Commit Body

Checking GitHub Actions for updates spawns `git ls-remote` against every
repository referenced by the workflow files. That reaches the network in a
way pnpm cannot validate up front, and it fails wherever GitHub is not
reachable the way pnpm assumes: a GitHub Enterprise Server hosting the
actions (pnpm/pnpm#13220), a container with a custom certificate authority
(pnpm/pnpm#13254), an offline or proxied CI network.

Both reports came within days of the feature shipping, and neither is
fixable from pnpm's side, so the check no longer runs unless it is asked
for. `pnpm outdated` and `pnpm update` — interactive or not, recursive or
not — now read workflow files only with `--include-github-actions` or with
`update.githubActions` set to `true`.

`update.githubActions: false` keeps working; it is now equivalent to
leaving the setting unset, so anyone who added it to silence the warnings
needs no change.

The opt-in rule lives in one place per stack (`shouldCheckGitHubActions`
and `github_actions::opted_in`) and is shared by every call site, so the
commands cannot drift apart again. `pnpm outdated` gained the
`--include-github-actions` flag it was missing.

Closes pnpm/pnpm#13254

Checklist

  • The change is implemented in both the TypeScript CLI and the Rust
    pnpm/ port, or the description notes what still needs porting.
  • Added a changeset (pnpm changeset) if this PR changes any published
    package. Keep it short and written for pnpm users — it becomes a release note.
  • Added or updated tests.
  • Updated the documentation if needed.

Written by an agent (Claude Code, claude-opus-4-8).

zkochan added 2 commits July 24, 2026 00:31
Checking GitHub Actions for updates spawns `git ls-remote` against every
repository referenced by the workflow files. That reaches the network in a
way pnpm cannot validate up front, and it fails wherever GitHub is not
reachable the way pnpm assumes: a GitHub Enterprise Server hosting the
actions (#13220), a container with a custom certificate authority
(#13254), an offline or proxied CI network.

Both reports came within days of the feature shipping, and neither is
fixable from pnpm's side, so the check no longer runs unless it is asked
for. `pnpm outdated` and `pnpm update` — interactive or not, recursive or
not — now read workflow files only with `--include-github-actions` or with
`update.githubActions` set to `true`.

`update.githubActions: false` keeps working; it is now equivalent to
leaving the setting unset, so anyone who added it to silence the warnings
needs no change.

The opt-in rule lives in one place per stack (`shouldCheckGitHubActions`
and `github_actions::opted_in`) and is shared by every call site, so the
commands cannot drift apart again. `pnpm outdated` gained the
`--include-github-actions` flag it was missing.

Closes #13254
Copilot AI review requested due to automatic review settings July 23, 2026 22:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

GitHub Actions inspection for pnpm outdated and pnpm update is now opt-in through --include-github-actions or update.githubActions: true. Shared gating logic, CLI wiring, tests, and documentation were updated across the Rust and TypeScript implementations.

Changes

GitHub Actions opt-in behavior

Layer / File(s) Summary
Shared opt-in contract
pnpm/crates/cli/src/github_actions.rs, pnpm11/deps/github-actions/src/index.ts
Adds shared predicates that enable GitHub Actions checks only through the CLI flag or explicit configuration.
Outdated command integration
pnpm/crates/cli/src/cli_args/outdated.rs, pnpm11/deps/inspection/commands/src/outdated/*, pnpm11/deps/inspection/commands/test/outdated/*
Adds --include-github-actions, applies opt-in gating to regular and recursive outdated checks, and tests default and enabled behavior.
Update command integration
pnpm/crates/cli/src/cli_args/update.rs, pnpm11/installing/commands/src/update/*
Centralizes GitHub Actions eligibility for interactive and non-interactive updates while preserving development-dependency and save-mode guards.
Behavior documentation
.changeset/*, pnpm/crates/config/src/workspace_yaml.rs, pnpm11/core/types/src/package.ts
Documents opt-in workflow inspection, update.githubActionsServer, and the updated GitHub Actions update behavior.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Assessment against linked issues

Objective Addressed Explanation
Prevent pnpm update --interactive from failing when GitHub Action repository refs cannot be read [#13254] ✅
Show GitHub Actions updates by default during interactive updates [#13254] ❌ GitHub Actions inspection is now disabled by default and requires --include-github-actions or update.githubActions: true.

Possibly related PRs

  • pnpm/pnpm#13198: Adds the GitHub Actions discovery and update plumbing modified by this PR’s opt-in gating.

Suggested labels: product: pnpm@11, product: pacquet

Suggested reviewers: copilot

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-13254

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Make GitHub Actions dependency checks opt-in for pnpm outdated/update

🐞 Bug fix ✨ Enhancement 🧪 Tests 📝 Documentation 🕐 40+ Minutes

Grey Divider

AI Description

• Make GitHub Actions update checks opt-in to avoid unexpected network git ls-remote calls.
• Add/standardize --include-github-actions and update.githubActions: true gating across
 commands.
• Add regression tests and update release notes for the new default behavior.
Diagram

graph TD
  A["CLI: outdated/update"] --> B{"Opted in?\n(--include-github-actions\n or update.githubActions: true)"}
  B -->|"Yes"| C["GitHub Actions deps module"] --> D["Scan workflow/action files"] --> E["git ls-remote per repo"] --> F["Remote Git server"]
  B -->|"No"| G["Skip Actions check"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Implicit opt-in when action selectors are provided
  • ➕ More discoverable: pnpm outdated actions/checkout would “just work” without extra flags/config.
  • ➕ Avoids surprising users who explicitly target a GitHub Action dependency.
  • ➖ Still causes unexpected network access for some invocations (e.g. scripts passing selectors).
  • ➖ More complex rules (depends on args), harder to explain and keep consistent across stacks.
2. Keep default-on but add retries/CA/proxy configuration for git
  • ➕ No behavior change for users relying on Actions checks without configuration.
  • ➕ Could address a subset of network failures with better git/environment propagation.
  • ➖ Does not solve core issue: pnpm cannot pre-validate reachability/auth/CA for arbitrary git remotes before failing.
  • ➖ Continues surprising read-only commands (outdated) with network traffic.
3. Separate subcommand (e.g. `pnpm github-actions outdated`)
  • ➕ Very explicit; eliminates surprises in outdated/update entirely.
  • ➕ Cleaner UX boundary for a network-heavy feature.
  • ➖ More surface area and maintenance burden.
  • ➖ Harder to integrate into existing update UX (especially interactive flows).

Recommendation: The PR’s approach (global opt-in via a single predicate used by all call sites) is the best tradeoff: it eliminates unexpected network calls while keeping a straightforward escape hatch (--include-github-actions / update.githubActions: true). The centralized helpers (shouldCheckGitHubActions in JS and github_actions::opted_in in Rust) also reduce drift risk between interactive and non-interactive paths.

Files changed (16) +252 / -43

Enhancement (2) +27 / -1
github_actions.rsIntroduce 'opted_in' predicate for GitHub Actions workflow scanning +12/-1

Introduce 'opted_in' predicate for GitHub Actions workflow scanning

• Adds a small, shared helper that encodes the opt-in rule: enable only when '--include-github-actions' is passed or 'update.githubActions' is explicitly 'true'.

pnpm/crates/cli/src/github_actions.rs

index.tsAdd 'shouldCheckGitHubActions' helper to centralize opt-in logic (JS) +15/-0

Add 'shouldCheckGitHubActions' helper to centralize opt-in logic (JS)

• Introduces 'shouldCheckGitHubActions(opts)' and a small options shape so callers can consistently gate workflow scanning across commands.

pnpm11/deps/github-actions/src/index.ts

Bug fix (5) +29 / -23
outdated.rsAdd '--include-github-actions' to Rust 'outdated' and gate checks via helper +6/-2

Add '--include-github-actions' to Rust 'outdated' and gate checks via helper

• Adds a new 'include_github_actions' CLI flag and replaces ad-hoc config checks with 'github_actions::opted_in(...)' so workflow scanning only happens when explicitly enabled.

pnpm/crates/cli/src/cli_args/outdated.rs

update.rsUnify Rust 'update' GitHub Actions gating behind 'opted_in' +1/-3

Unify Rust 'update' GitHub Actions gating behind 'opted_in'

• Simplifies 'should_update_github_actions' by delegating opt-in logic to 'github_actions::opted_in(...)', removing interactive-mode default behavior.

pnpm/crates/cli/src/cli_args/update.rs

outdated.tsAdd '--include-github-actions' support and gate Actions scanning +9/-3

Add '--include-github-actions' support and gate Actions scanning

• Adds the CLI option to types/help and uses 'shouldCheckGitHubActions' so 'outdated' avoids reading workflows unless opted in.

pnpm11/deps/inspection/commands/src/outdated/outdated.ts

recursive.tsGate recursive 'outdated' GitHub Actions scan behind opt-in helper +2/-2

Gate recursive 'outdated' GitHub Actions scan behind opt-in helper

• Replaces the previous 'githubActions !== false' check with 'shouldCheckGitHubActions', ensuring recursive and non-recursive paths behave identically.

pnpm11/deps/inspection/commands/src/outdated/recursive.ts

index.tsMake interactive and non-interactive 'update' opt-in for Actions checks +11/-13

Make interactive and non-interactive 'update' opt-in for Actions checks

• Uses 'shouldCheckGitHubActions' (plus include/save/lockfile constraints) via a new 'shouldUpdateGitHubActions' helper. Removes prior interactive-update default-on behavior and ensures the same rule is used for scanning and updating workflows.

pnpm11/installing/commands/src/update/index.ts

Tests (4) +172 / -5
tests.rsUpdate Rust 'update' tests for new opt-in semantics +9/-4

Update Rust 'update' tests for new opt-in semantics

• Renames and adjusts the test to assert GitHub Actions are not checked by default (including interactive), and only enabled via flag or config.

pnpm/crates/cli/src/cli_args/update/tests.rs

tests.rsAdd unit test for opt-in predicate behavior +16/-1

Add unit test for opt-in predicate behavior

• Adds coverage for the opt-in rules, ensuring 'false' does not enable checks while 'true' does, and that the CLI flag always enables checks.

pnpm/crates/cli/src/github_actions/tests.rs

githubActions.tsAdd JS tests ensuring 'outdated' doesn’t scan workflows by default +86/-0

Add JS tests ensuring 'outdated' doesn’t scan workflows by default

• Adds Jest tests that mock 'findOutdatedGitHubActions' and assert it is called only when '--include-github-actions' is set or config enables it (including recursive mode).

pnpm11/deps/inspection/commands/test/outdated/githubActions.ts

githubActions.tsAdd JS tests for interactive 'update' opt-in behavior +61/-0

Add JS tests for interactive 'update' opt-in behavior

• Adds Jest coverage verifying interactive updates do not scan workflows unless opted in via flag or 'update.githubActions: true'.

pnpm11/installing/commands/test/update/githubActions.ts

Documentation (5) +24 / -14
github-actions-server-setting.mdRemove outdated note about 'update.githubActions: false' behavior +0/-2

Remove outdated note about 'update.githubActions: false' behavior

• Deletes the release-note line implying 'update.githubActions: false' is the mechanism to skip checks. This aligns the changeset history with the new opt-in-by-default behavior.

.changeset/github-actions-server-setting.md

interactive-update-github-actions-opt-in.mdAdd changeset announcing opt-in GitHub Actions checks +12/-0

Add changeset announcing opt-in GitHub Actions checks

• Introduces release notes stating that workflow scanning is opt-in for 'outdated' and 'update', with the new '--include-github-actions' flag and 'update.githubActions: true' config.

.changeset/interactive-update-github-actions-opt-in.md

update-github-actions.mdUpdate changeset wording to reflect opt-in for both commands +1/-1

Update changeset wording to reflect opt-in for both commands

• Adjusts prior release notes so both 'pnpm outdated' and 'pnpm update' include GitHub Actions only when opted in, removing the special-casing for non-interactive updates.

.changeset/update-github-actions.md

workspace_yaml.rsClarify 'update.githubActions' docs as opt-in setting (Rust config) +8/-8

Clarify 'update.githubActions' docs as opt-in setting (Rust config)

• Updates doc comments to describe the new opt-in semantics for 'pnpm outdated' and 'pnpm update', including the flag-based override.

pnpm/crates/config/src/workspace_yaml.rs

package.tsClarify 'githubActions' setting semantics in TypeScript types +3/-3

Clarify 'githubActions' setting semantics in TypeScript types

• Updates the 'UpdateSettings.githubActions' docstring to reflect opt-in behavior and the '--include-github-actions' override.

pnpm11/core/types/src/package.ts

@greptile-apps

greptile-apps Bot commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains within the scope of the prior review threads.

Reviews (2): Last reviewed commit: "revert(changeset): restore the already-c..." | Re-trigger Greptile

…sets

Both intents were consumed at release time: update-github-actions by
[email protected] and [email protected], github-actions-server-setting by
[email protected] and [email protected]. Their text is published release
notes, so rewriting it to describe the new opt-in default was wrong; the
files linger only until the registry-confirmed garbage collection removes
them. The behavior change is described by its own changeset.
@github-actions

github-actions Bot commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

Micro-Benchmark Results

Linux

group                          main                                   pr
-----                          ----                                   --
lockfile/parse_pnpm_lock       1.00     13.2±0.53ms    28.3 MB/sec    1.04     13.8±0.37ms    27.2 MB/sec
packument/parse                1.00     43.1±1.17µs  1539.1 MB/sec    1.11     47.7±3.79µs  1391.3 MB/sec
tarball/download_dependency    1.00      3.4±0.41ms  1258.7 KB/sec    1.53      5.3±0.80ms   821.8 KB/sec

Copilot AI review requested due to automatic review settings July 23, 2026 22:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

/improve is deprecated. Use /agentic_review instead (removal date not yet scheduled).

No code suggestions found for the PR.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
pnpm11/deps/inspection/commands/test/outdated/githubActions.ts (1)

25-76: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Cover explicit update.githubActions: false in both TypeScript command suites.

The PR contract preserves explicit disablement, but neither suite asserts that false skips inspection or that --include-github-actions overrides it.

  • pnpm11/deps/inspection/commands/test/outdated/githubActions.ts#L25-L76: add false-config skip and flag-override assertions.
  • pnpm11/installing/commands/test/update/githubActions.ts#L31-L60: add the same assertions for interactive update.

As per path instructions, tests must cover default skip, explicit opt-in, and cross-stack parity; the PR objective explicitly requires preserving update.githubActions: false.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pnpm11/deps/inspection/commands/test/outdated/githubActions.ts` around lines
25 - 76, Extend the GitHub Actions tests in
pnpm11/deps/inspection/commands/test/outdated/githubActions.ts#L25-L76 and
pnpm11/installing/commands/test/update/githubActions.ts#L31-L60 to assert that
updateConfig.githubActions: false skips inspection, while includeGithubActions:
true overrides the explicit disablement. Preserve coverage for default skip and
explicit opt-in, ensuring both command suites maintain equivalent behavior.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@pnpm11/deps/inspection/commands/test/outdated/githubActions.ts`:
- Around line 25-76: Extend the GitHub Actions tests in
pnpm11/deps/inspection/commands/test/outdated/githubActions.ts#L25-L76 and
pnpm11/installing/commands/test/update/githubActions.ts#L31-L60 to assert that
updateConfig.githubActions: false skips inspection, while includeGithubActions:
true overrides the explicit disablement. Preserve coverage for default skip and
explicit opt-in, ensuring both command suites maintain equivalent behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 74449416-1865-45f9-b8d8-34178762aeef

📥 Commits

Reviewing files that changed from the base of the PR and between f4ebdb9 and f181a4d.

📒 Files selected for processing (16)
  • .changeset/github-actions-server-setting.md
  • .changeset/interactive-update-github-actions-opt-in.md
  • .changeset/update-github-actions.md
  • pnpm/crates/cli/src/cli_args/outdated.rs
  • pnpm/crates/cli/src/cli_args/update.rs
  • pnpm/crates/cli/src/cli_args/update/tests.rs
  • pnpm/crates/cli/src/github_actions.rs
  • pnpm/crates/cli/src/github_actions/tests.rs
  • pnpm/crates/config/src/workspace_yaml.rs
  • pnpm11/core/types/src/package.ts
  • pnpm11/deps/github-actions/src/index.ts
  • pnpm11/deps/inspection/commands/src/outdated/outdated.ts
  • pnpm11/deps/inspection/commands/src/outdated/recursive.ts
  • pnpm11/deps/inspection/commands/test/outdated/githubActions.ts
  • pnpm11/installing/commands/src/update/index.ts
  • pnpm11/installing/commands/test/update/githubActions.ts
💤 Files with no reviewable changes (1)
  • .changeset/github-actions-server-setting.md

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Qodo Logo

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

/improve is deprecated. Use /agentic_review instead (removal date not yet scheduled).

No code suggestions found for the PR.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.91%. Comparing base (3b1c181) to head (aa7cf39).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13259      +/-   ##
==========================================
- Coverage   86.91%   86.91%   -0.01%     
==========================================
  Files         528      528              
  Lines       90605    90606       +1     
==========================================
- Hits        78752    78746       -6     
- Misses      11853    11860       +7     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

11.17.0 prints warning about certificate on pnpm update --interactive

3 participants