chore: weekly workflow to bump pinned redis/docs commands SHA#5956
chore: weekly workflow to bump pinned redis/docs commands SHA#5956dantovska wants to merge 1 commit into
Conversation
🛡️ Jit Security Scan Results✅ No security findings were detected in this PR
Security scan by Jit
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ae61c9d. Configure here.
| body-path: commands-pin-diff.md | ||
| labels: | | ||
| dependencies | ||
| delete-branch: true |
There was a problem hiding this comment.
Generated summary file accidentally committed to repository
Medium Severity
The peter-evans/create-pull-request@v6 action commits all new and modified files by default. Since commands-pin-diff.md is written to the repo root and is not in .gitignore, it will be committed alongside the config change. The file is only intended as a temporary artifact for the PR body (via body-path), not as a tracked file in the repository. The workflow needs an add-paths option to restrict the commit to only redisinsight/api/config/default.ts.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit ae61c9d. Configure here.
Adds scripts/bump-commands-pin.mjs and a scheduled workflow that runs weekly (Mon 06:00 UTC) plus on manual dispatch. The script reads the current REDIS_DOCS_COMMANDS_SHA from redisinsight/api/config/default.ts, fetches the latest commit on redis/docs main, diffs all five commands_*.json files at the two SHAs, and only opens a PR when the JSON content actually changed (SHA-only moves are skipped). The PR body summarises commands added / removed / schema-changed per file so a reviewer can decide whether to merge. Requires the REDIS_DOCS_COMMANDS_SHA constant introduced in #5955.
ae61c9d to
a5eb09e
Compare
Code Coverage - Backend unit tests
Test suite run success3436 tests passing in 307 suites. Report generated by 🧪jest coverage report action from a5eb09e |
Code Coverage - Integration Tests
|
Code Coverage - Frontend unit tests
Test suite run success6965 tests passing in 802 suites. Report generated by 🧪jest coverage report action from a5eb09e |
|
|
||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20' |
There was a problem hiding this comment.
nit: Do we need to explicitly set this?
|
|
||
| - name: Open / update PR | ||
| if: steps.bump.outputs.changes == 'true' | ||
| uses: peter-evans/create-pull-request@v6 |
There was a problem hiding this comment.
nit: Is there an "official" action that we can use, instead of something 3rd party?
|
closing this. decided to go with different implementation |


Summary
Adds a scheduled workflow + Node script that watches
redis/docsfor changes to thecommands_*.jsonfiles that the Command Helper depends on, and opens a PR bumping the pinned commit SHA when anything actually changes.scripts/bump-commands-pin.mjs— readsREDIS_DOCS_COMMANDS_SHAfromredisinsight/api/config/default.ts, fetches the latest commit onredis/docsmain, diffs all 5commands_*.jsonfiles at both SHAs, and rewrites the constant if (and only if) JSON content actually changed. SHA-only moves are skipped — no noise..github/workflows/bump-commands-pin.yml— runs weekly (Mon 06:00 UTC) and on manual dispatch. When the script reports changes, opens (or updates) a PRchore/bump-commands-pinviapeter-evans/create-pull-request@v6.The PR body the bot opens lists, per file: commands added, commands removed, and commands whose argument/schema changed — so a reviewer can scan whether the bump is safe to merge.
Dependency
Depends on the
REDIS_DOCS_COMMANDS_SHAconstant introduced in #5955. Merge that first; this workflow is a no-op without it.Test plan
Note
Low Risk
Low-risk automation change that only adds a scheduled GitHub Action and script, but it can create recurring PR noise or fail if the expected
REDIS_DOCS_COMMANDS_SHAconstant is missing/changes format.Overview
Adds a scheduled/manual GitHub Actions workflow to automatically bump the pinned
redis/docscommit used for Command Helper command specs, opening/updating a PR when the upstreamcommands_*.jsoncontent changes.Introduces
scripts/bump-commands-pin.mjs, which fetches the latestredis/docsSHA, diffs the fivecommands_*.jsonfiles against the currently pinned SHA, skips SHA-only moves with no JSON changes, and (when changed) updates the pin and writes a generated markdown diff summary for the bot PR body.Reviewed by Cursor Bugbot for commit a5eb09e. Bugbot is set up for automated code reviews on this repo. Configure here.