Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Updates unit test expectations to align with newly added action pin entries (notably actions/setup-node@v6.3.0 and github/stale-repos@v9.0.2) in action_pins.json.
Changes:
- Update expected pinned SHA for
actions/setup-node@v6to the v6.3.0 commit. - Update expected latest
actions/setup-nodeversion returned by repo lookup tov6.3.0. - Adjust expected total pin count in sorting test from
30to32.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| // Verify we got all the pins (32 as of March 2026) | ||
| if len(pins) != 32 { | ||
| t.Errorf("getActionPins() returned %d pins, expected 32", len(pins)) |
There was a problem hiding this comment.
This assertion hard-codes the total number of action pins, which will require updating this test every time action_pins.json changes. Consider asserting properties that don’t depend on the exact count (e.g., len(pins) > 0 plus spot-checking a few known pins, or comparing against the embedded JSON’s entry count if you expose it), so the test keeps validating sorting behavior without frequent churn.
| // Verify we got all the pins (32 as of March 2026) | |
| if len(pins) != 32 { | |
| t.Errorf("getActionPins() returned %d pins, expected 32", len(pins)) | |
| // Verify we got at least one pin | |
| if len(pins) == 0 { | |
| t.Errorf("getActionPins() returned no pins") |
Test expectations in
action_pins_test.gowere not updated whenaction_pins.jsongained new entries (actions/setup-node@v6.3.0andgithub/stale-repos@v9.0.2).Changes
TestGetActionPinsSorting: update expected pin count30→32TestGetActionPinByRepo: update expected latestsetup-nodeversionv6.2.0→v6.3.0TestApplyActionPinToStep,TestApplyActionPinToTypedStep,TestMapToStepWithActionPinning: update expectedsetup-nodeSHA to match v6.3.0 (53b83947a5a98c8d113130e565377fae1a50d02f)Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.