Conversation
5e2faab to
d653adb
Compare
bb3e218 to
2fa00bf
Compare
5ac5da5 to
883a1dc
Compare
This comment has been minimized.
This comment has been minimized.
| steps: | ||
| - name: Check out Git repository | ||
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 | ||
| uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 | ||
| with: | ||
| node-version-file: .nvmrc | ||
| check-latest: true |
There was a problem hiding this comment.
The setup steps for checking out the repository and setting up Node.js are repeated in both the 'lint' and 'test' jobs. This violates the DRY (Don't Repeat Yourself) principle. To centralize this logic, you can create a composite action (e.g., in .github/actions/setup/action.yml) containing the common steps. Then, both jobs can simply call this action using a single uses step, making the workflow cleaner and easier to maintain.
Kody Rule violation: Extract duplicated logic into functions
steps:
- name: Setup Environment
uses: ./.github/actions/setup # Assumes a composite action is created at this pathPrompt for LLM
File .github/workflows/code-quality.yml:
Line 18 to 26:
I'm reviewing a GitHub Actions workflow file. I have a rule that says 'Duplicate sequences of statements must be extracted into a named function or utility.' In my workflow file, `.github/workflows/code-quality.yml`, I have two jobs, 'lint' and 'test'. Both of these jobs have the exact same initial steps: one to checkout the git repository and another to set up Node.js. This is a clear case of code duplication. How can I refactor this workflow to remove the duplication and follow my rule? Please suggest a solution using standard GitHub Actions features like composite actions or reusable workflows, and explain the benefits.
Suggested Code:
steps:
- name: Setup Environment
uses: ./.github/actions/setup # Assumes a composite action is created at this path
Talk to Kody by mentioning @kody
Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.
883a1dc to
2dc8508
Compare
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
|



This PR contains the following updates:
v6.0.1→v6.0.2v6.1.0→v6.2.0v4.31.9→v4.32.3Release Notes
actions/checkout (actions/checkout)
v6.0.2Compare Source
actions/setup-node (actions/setup-node)
v6.2.0Compare Source
github/codeql-action (github/codeql-action)
v4.32.3Compare Source
v4.32.2Compare Source
v4.32.1Compare Source
v4.32.0Compare Source
v4.31.11Compare Source
v4.31.10Compare Source
CodeQL Action Changelog
See the releases page for the relevant changes to the CodeQL CLI and language packs.
4.31.10 - 12 Jan 2026
See the full CHANGELOG.md for more information.
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR was generated by Mend Renovate. View the repository job log.