Skip to content

Commit adf1d8a

Browse files
heiskrCopilotCopilot
authored
⚙️ Use package.json Node version in changelog agent (#64458)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Copilot-Session: 2e7a0086-4439-4fb9-9306-74232c70d818
1 parent 61c0afa commit adf1d8a

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

‎.github/workflows/changelog-agent.yml‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,11 +393,22 @@ jobs:
393393
fs.writeFileSync('prompt.txt', userPrompt);
394394
core.setOutput('date_str', dateStr);
395395
396+
# Use a subdirectory: checkout would clear the workspace and the prompt files above.
397+
- name: Check out package.json for the Node version
398+
if: steps.check_parent.outputs.has_parent == 'true' && steps.check_existing.outputs.exists == 'false'
399+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
400+
with:
401+
path: node-version-source
402+
sparse-checkout: /package.json
403+
sparse-checkout-cone-mode: false
404+
persist-credentials: false
405+
396406
- name: Set up Node.js for Copilot CLI
397407
if: steps.check_parent.outputs.has_parent == 'true' && steps.check_existing.outputs.exists == 'false'
398408
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
399409
with:
400-
node-version: 24
410+
node-version-file: node-version-source/package.json
411+
check-latest: true
401412

402413
- name: Install GitHub Copilot CLI
403414
if: steps.check_parent.outputs.has_parent == 'true' && steps.check_existing.outputs.exists == 'false'

0 commit comments

Comments
 (0)