Skip to content

implemented update dependencies action - #111

Merged
ramaghanta merged 18 commits into
mainfrom
dependency-updates-action
Oct 26, 2026
Merged

ramaghanta merged 18 commits into
mainfrom
dependency-updates-action

Conversation

@ramaghanta

Copy link
Copy Markdown
Contributor

closes #110

@ramaghanta ramaghanta self-assigned this Oct 26, 2026
Copilot AI lite review requested due to automatic review settings October 26, 2026 17:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Unresolved critical and moderate findings affect action execution, security, deletion handling, outputs, and automated pull-request checks.

5 open issues
What changed in this PR

This pull request adds an issue-comment-driven GitHub Action that updates npm dependencies, validates the changes, and publishes a signed dependency-update pull request.

Changes:

  • Adds action metadata, caller documentation, and repository context handling.
  • Implements comment authorization, dependency migration, version updates, validation, and lockfile regeneration.
  • Adds GitHub API publication, pull-request management, tests, and package version updates.
File Description
update-dependencies/​README.md Documents action behavior, workflow setup, validation, and logging.
update-dependencies/​action.yml Defines the Node 24 action, inputs, outputs, and lifecycle scripts.
src/​update-dependencies/​update-dependencies.ts Implements dependency migration, validation, and publication orchestration.
src/​update-dependencies/​update-dependencies.spec.ts Tests dependency migration, validation, failures, and authorization flow.
src/​update-dependencies/​publish.ts Creates update branches, signed commits, pull requests, labels, assignments, and comments.
src/​update-dependencies/​publish.spec.ts Tests commit publication, verification, pull-request creation, and metadata handling.
src/​update-dependencies/​issue-command.ts Validates issue comments and commenter permissions.
src/​update-dependencies/​issue-command.spec.ts Tests authorization and ignored comment cases.
src/​update-dependencies/​index.ts Provides action-level error handling and failure comments.
src/​update-dependencies/​client.ts Creates the authenticated GitHub client and resolves repository context.
src/​update-dependencies/​client.spec.ts Tests required token configuration.
package.json Bumps the package version to 4.3.0.
package-lock.json Updates lockfile metadata and resolved dependency versions.

Review effort: Lite

Comment thread update-dependencies/action.yml Resolved
Comment thread update-dependencies/README.md Resolved
@ramaghanta
ramaghanta requested a review from carlansley October 26, 2026 17:44
updater then:

1. Increments the package's own version by one patch, without a Git tag or commit.
Removes `rimraf` and `@types/koa__router` from dependency sections and replaces

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.

regarding the @types/koa__router change, this could be made more general. i.e. if a package (in this case @koa/router) has types defined internally, we should remove the @types declaration. of course maybe create an issue for our future selves, not suggesting we need to do it for this PR.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

good idea. created #112

Comment thread src/update-dependencies/client.spec.ts Outdated

import { getDependencyClient } from './client.ts';

it('requires GITHUB_TOKEN like existing GitHub API helpers', () => {

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.

wrap in a describe block

@ramaghanta
ramaghanta requested review from carlansley and a lite review from Copilot October 26, 2026 18:06
@github-actions

Copy link
Copy Markdown

❌ PR review status - has 1 reviewer outstanding

@github-actions

Copy link
Copy Markdown

Coverage after merging dependency-updates-action into main will be

95.73%▾ -0.92%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src/check-dependencies
   check-dependencies.spec.ts100%100%100%100%
   check-dependencies.ts98.74%94.67%100%100%91, 156, 200, 200
src/check-imports
   package-lock-file-utility.spec.ts100%100%100%100%
   package-lock-file-utility.ts100%100%100%100%
   packages-not-allowed.spec.ts83.33%100%66.67%83.33%13–15
   packages-not-allowed.ts100%100%100%100%
src/check-label
   check-label-compare-match-semver.spec.ts100%100%100%100%
   check-label.spec.ts100%100%100%100%
   check-label.ts95.08%90%100%95.96%68–70, 78–80
src/check-pr-reviews
   check-pr-reviews.spec.ts100%100%100%100%
   check-pr-reviews.ts50.65%40%100%50.70%22–37, 41–59, 68–70
src/coverage-reporter
   html.spec.ts100%100%100%100%
   html.ts100%100%100%100%
   lcov.spec.ts100%100%100%100%
   lcov.ts93.72%90.91%80%94.44%117–127, 134
   tabulate.spec.ts100%100%100%100%
   tabulate.ts98.87%94.44%100%100%176, 176, 183
   utility.spec.ts100%100%100%100%
   utility.ts100%100%100%100%
src/github-api
   index-context.spec.ts100%100%100%100%
   index-publish-comment.spec.ts100%100%100%100%
   index-reviews.spec.ts100%100%100%100%
   index.spec.ts100%100%100%100%
   index.ts83.22%71.64%100%84.83%61, 70, 77–81, 98–103, 108–111, 126–128, 146–149, 179–184, 207–216, 235–238, 243–246, 265–268, 273–276, 287–290, 301–303, 311–313, 315–318, 341–343
src/prepare-beta
   package.spec.ts100%100%100%100%
   package.ts94.12%75%100%95.56%23–25
src/publish-beta
   files.spec.ts100%100%100%100%
   files.ts94.03%92.31%100%94%36–39
   package.spec.ts100%100%100%100%
   package.ts95.38%85.71%100%96.36%23–25
   publish.spec.ts100%100%100%100%
   publish.ts85.37%100%50%86.11%32–36
   validate-name-and-resource-length.spec.ts100%100%100%100%
   validate-name-and-resource-length.ts89.13%100%71.43%88.07%35–40, 103–109
src/update-dependencies
   client.spec.ts90.63%80%100%91.67%19–21
   client.ts60%66.67%50%60%12–13, 17–25
   issue-command.spec.ts100%100%100%100%
   issue-command.ts100%100%100%100%
   publish.spec.ts99.52%92.86%100%100%60
   publish.ts70.72%75%44.44%71.50%31–33, 40–42, 87, 90, 93, 133–138, 141–150, 153–170, 173–179, 182–191
   update-dependencies.spec.ts99.04%98.08%89.66%100%209
   update-dependencies.ts88.54%80%100%90.37%106, 132–134, 140, 140–143, 143–145, 164–166, 170–173, 175, 214–216, 221–223, 239–249, 252–254
src/validate-npm-package
   validate-npm-package.spec.ts99.19%96%95.24%100%30
   validate-npm-package.ts89.43%64%100%92.35%41, 62–70, 72, 89, 92–97, 113, 178–182

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Unresolved critical and moderate issues affect workflow triggering, deletion publication, output consistency, and rimraf migration behavior.

1 open issue
1 previously missed issue

In code that hasn't changed since last review

Medium severity Issue URL missing when existing update PR is reused

src/​update-dependencies/​update-dependencies.ts:241

When an existing update PR is found, this early return sets only pull-request-url; the declared issue-url output remains empty, unlike the normal publication path. Consumers cannot reliably obtain the issue URL on the retry/already-published path. Set the issue URL before returning.

5 resolved since last review

Review effort: Lite

Comment on lines +100 to +109
Pass the built-in `GITHUB_TOKEN` with contents, issues, and pull requests write
permissions. The action publishes through GitHub's API, so checkout can use
`persist-credentials: false`. No manually created write token or signing key is
needed. Enable Actions PR creation in repository settings and ensure `PATCH`
already exists.

The action's own JavaScript runtime is Node 24; npm and project scripts use the
Node version configured by the caller. In-action tests run on Node 26 and do not
replace the repository's PR checks or its Node 24/26 matrix. Verify that those
checks run on the resulting PR before merging. Token-applied labels do not
@ramaghanta
ramaghanta merged commit 4967841 into main Oct 26, 2026
12 of 13 checks passed
@ramaghanta
ramaghanta deleted the dependency-updates-action branch October 26, 2026 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

create update-dependencies action

3 participants