[#2567] Posted a yarn.lock dependency changes summary as a PR comment in GitHub Actions.#2581
Conversation
|
Need the big picture first? Review this PR in Change Stack to see what changed before going file by file. Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (6)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughAdds a GitHub Actions step to detect and post root ChangesCI Enhancements and Maintenance
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2581 +/- ##
==========================================
- Coverage 86.56% 86.11% -0.46%
==========================================
Files 94 87 -7
Lines 4661 4502 -159
Branches 47 3 -44
==========================================
- Hits 4035 3877 -158
+ Misses 626 625 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
8d71827 to
a49f834
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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.
Inline comments:
In @.github/workflows/build-test-deploy.yml:
- Around line 572-577: The "Post yarn.lock changes as a PR comment" step using
Simek/yarn-lock-changes@59f47ee499424d2c2437c5aebf863b5c6d50a5bc does not remove
a previously posted PR comment when yarn.lock stops changing; add a separate
cleanup step after that job to find and delete the stale comment (e.g., a new
step named "Remove stale yarn.lock comment" using actions/github-script or an
Octokit-based script) that runs on pull_request and targets comments created by
the Simek action (match by author/unique text), and guard it with the same
conditionals (github.event_name == 'pull_request' and matrix.instance == 0 ||
strategy.job-total == 1) so stale comments are explicitly removed when yarn.lock
changes cease.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 4d4c7333-0cdc-4f4b-9c31-362dc18c01bc
📒 Files selected for processing (5)
.github/workflows/build-test-deploy.yml.vortex/CLAUDE.md.vortex/docs/.utils/variables/extra/ci.variables.sh.vortex/docs/content/continuous-integration/github-actions.mdx.vortex/docs/content/development/variables.mdx
| - name: Post yarn.lock changes as a PR comment | ||
| if: ${{ !cancelled() && github.event_name == 'pull_request' && (matrix.instance == 0 || strategy.job-total == 1) && hashFiles('yarn.lock') != '' && vars.VORTEX_CI_DEPS_PR_COMMENT_SKIP != '1' }} | ||
| uses: Simek/yarn-lock-changes@59f47ee499424d2c2437c5aebf863b5c6d50a5bc # v0.14.1 | ||
| continue-on-error: true | ||
| with: | ||
| token: ${{ secrets.GITHUB_TOKEN }} |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify that the pinned commit matches the v0.14.1 tag in the upstream repository
echo "Checking if commit 59f47ee499424d2c2437c5aebf863b5c6d50a5bc corresponds to v0.14.1..."
gh api repos/Simek/yarn-lock-changes/git/refs/tags/v0.14.1 --jq '.object.sha'Repository: drevops/vortex
Length of output: 185
🌐 Web query:
Does the Simek/yarn-lock-changes GitHub Action remove the PR comment when the yarn.lock file no longer has changes in subsequent pushes?
💡 Result:
The Simek/yarn-lock-changes GitHub Action does not automatically remove the PR comment if the yarn.lock file no longer has changes in subsequent pushes [1][2][3]. The action's primary function is to report changes to the yarn.lock file [1][3]. While it offers an updateComment input (which defaults to true) to overwrite an existing comment with new information on subsequent commits [1][2][3], it does not include logic to delete the comment if no changes are detected. Consequently, if the yarn.lock file stops having changes, any previously posted comment will remain in the pull request conversation. To remove such comments, users would need to employ a separate utility, such as a dedicated PR comment deletion action, or handle the cleanup manually [4].
Citations:
- 1: https://github.com/Simek/yarn-lock-changes
- 2: https://github.com/Simek/yarn-lock-changes/blob/main/README.md
- 3: https://github.com/marketplace/actions/yarn-lock-changes
- 4: https://github.com/marketplace/actions/delete-pr-comments-during-subsequent-ci
Adjust PR-comment removal expectation for yarn-lock-changes step (lines 572-577)
- The pinned
Simek/yarn-lock-changes@59f47ee499424d2c2437c5aebf863b5c6d50a5bcmatches upstream tagv0.14.1. Simek/yarn-lock-changesdoes not automatically delete/clear the existing PR comment whenyarn.lockstops changing; if you need stale-comment cleanup, add a separate comment-deletion step.
🤖 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 @.github/workflows/build-test-deploy.yml around lines 572 - 577, The "Post
yarn.lock changes as a PR comment" step using
Simek/yarn-lock-changes@59f47ee499424d2c2437c5aebf863b5c6d50a5bc does not remove
a previously posted PR comment when yarn.lock stops changing; add a separate
cleanup step after that job to find and delete the stale comment (e.g., a new
step named "Remove stale yarn.lock comment" using actions/github-script or an
Octokit-based script) that runs on pull_request and targets comments created by
the Simek action (match by author/unique text), and guard it with the same
conditionals (github.event_name == 'pull_request' and matrix.instance == 0 ||
strategy.job-total == 1) so stale comments are explicitly removed when yarn.lock
changes cease.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Code coverage (threshold: 90%) Per-class coverage |
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
|
Code coverage (threshold: 90%) Per-class coverage |
Closes #2567
Summary
Wires the maintained
Simek/yarn-lock-changesGitHub Action (pinned to59f47ee499424d2c2437c5aebf863b5c6d50a5bc# v0.14.1) into thebuild-test-deploy.ymlworkflow to post a sticky PR comment summarising rootyarn.lockdependency changes (added, removed, and updated packages). The step is scoped to GitHub Actions only, mirroring the approach taken for code-coverage PR comments in #2564. It is guarded byhashFiles('yarn.lock'), runs on PR events only, usescontinue-on-error, and can be suppressed viaVORTEX_CI_DEPS_PR_COMMENT_SKIP=1.Changes
CI wiring - New step "Post yarn.lock changes as a PR comment" added to
.github/workflows/build-test-deploy.yml, positioned after the test-results upload step and before the artifact upload. Runs only when: the job is not cancelled, the event is a pull request, the run is the first matrix instance (or a single-instance run),yarn.lockexists at the repo root, andVORTEX_CI_DEPS_PR_COMMENT_SKIPis not1.Documentation - Added a "Dependency changes summary" section to
.vortex/docs/content/continuous-integration/github-actions.mdxexplaining the behaviour and the skip variable. AddedVORTEX_CI_DEPS_PR_COMMENT_SKIPto.vortex/docs/.utils/variables/extra/ci.variables.sh(with description) and regenerated into.vortex/docs/content/development/variables.mdx.Maintenance guide - Added a hard rule to
.vortex/CLAUDE.mdrequiringahoy update-snapshotsto run in the foreground only, documenting why backgrounding it causes partial-state commits and hidden failures.Fixtures - The
_baselineinstaller fixture has been updated to include the new step. The remaining diff-style fixtures (deploy_types_none_gha,provision_profile,tools_groups_no_be_tests,tools_no_phpunit,tools_none) have been updated to account for the shifted line numbers and/or the new step appearing in their diff windows. Note: only the baseline fixture received a full regeneration on this branch; a completeahoy update-snapshotspass covering all ~130 scenarios is still pending and will be needed before or shortly after merge.Before / After
Summary by CodeRabbit
New Features
Documentation
Chores