Skip to content

chore: Add automated npm dependency update workflow#6969

Merged
louislam merged 2 commits intomasterfrom
copilot/setup-daily-workflow
Feb 18, 2026
Merged

chore: Add automated npm dependency update workflow#6969
louislam merged 2 commits intomasterfrom
copilot/setup-daily-workflow

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 18, 2026

Runs npm update daily and creates a pull request.

Co-authored-by: louislam <1336778+louislam@users.noreply.github.com>
Copilot AI changed the title [WIP] Chore: Update dependencies feat: Add automated npm dependency update workflow Feb 18, 2026
Copilot AI requested a review from louislam February 18, 2026 06:12
@louislam louislam changed the title feat: Add automated npm dependency update workflow chore: Add automated npm dependency update workflow Feb 18, 2026
@louislam louislam marked this pull request as ready for review February 18, 2026 06:15
Copilot AI review requested due to automatic review settings February 18, 2026 06:15
@github-actions github-actions bot added the pr:needs review this PR needs a review by maintainers or other community members label Feb 18, 2026
@louislam louislam merged commit 4a3ba86 into master Feb 18, 2026
8 checks passed
@louislam louislam deleted the copilot/setup-daily-workflow branch February 18, 2026 06:16
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a scheduled GitHub Actions workflow to automatically run npm update on master daily and open/refresh a dependency update pull request for maintainers to review.

Changes:

  • Introduces a new scheduled/manual workflow to run npm update daily.
  • Detects package-lock.json changes, commits them, and force-pushes to an npm-update branch.
  • Creates a PR (if one doesn’t already exist) from npm-update into master.

Comment on lines +31 to +32
- name: Run npm update
run: npm update
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

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

npm update will materialize node_modules on the runner even though only package-lock.json is committed. To reduce runtime/disk usage (and typically avoid running install scripts), consider using a lockfile-only update mode (e.g., updating just package-lock.json) so the job focuses on generating the PR diff rather than performing a full install/update.

Suggested change
- name: Run npm update
run: npm update
- name: Run npm update (lockfile only)
run: npm update --package-lock-only

Copilot uses AI. Check for mistakes.
Comment on lines +20 to +32
- name: Checkout master branch
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
ref: master
token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Node.js
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: 20

- name: Run npm update
run: npm update
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

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

The workflow checks out with persisted GitHub credentials and then runs npm update, which can execute dependency lifecycle scripts. With contents: write / pull-requests: write, this increases the blast radius of a supply-chain compromise (scripts could potentially read persisted credentials and push/modify PRs). Consider checking out with persist-credentials: false and only injecting the token in the specific steps that need it (push/gh), to keep write credentials out of the workspace during npm update.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:needs review this PR needs a review by maintainers or other community members

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants