Skip to content

fix: update action pin test expectations for actions/setup-node v6.3.0#19537

Merged
pelikhan merged 2 commits intomainfrom
copilot/fix-tests-9baebba7-5ffe-40c1-88ed-65258167a5ca
Mar 4, 2026
Merged

fix: update action pin test expectations for actions/setup-node v6.3.0#19537
pelikhan merged 2 commits intomainfrom
copilot/fix-tests-9baebba7-5ffe-40c1-88ed-65258167a5ca

Conversation

Copy link
Contributor

Copilot AI commented Mar 4, 2026

Test expectations in action_pins_test.go were not updated when action_pins.json gained new entries (actions/setup-node@v6.3.0 and github/stale-repos@v9.0.2).

Changes

  • TestGetActionPinsSorting: update expected pin count 3032
  • TestGetActionPinByRepo: update expected latest setup-node version v6.2.0v6.3.0
  • TestApplyActionPinToStep, TestApplyActionPinToTypedStep, TestMapToStepWithActionPinning: update expected setup-node SHA to match v6.3.0 (53b83947a5a98c8d113130e565377fae1a50d02f)
Original prompt

Reference: https://github.com/github/gh-aw/actions/runs/22657907896/job/65671525496

Fix tests


💡 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.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing tests in the project fix: update action pin test expectations for actions/setup-node v6.3.0 Mar 4, 2026
@pelikhan pelikhan marked this pull request as ready for review March 4, 2026 08:08
Copilot AI review requested due to automatic review settings March 4, 2026 08:08
@pelikhan pelikhan merged commit f2570f2 into main Mar 4, 2026
@pelikhan pelikhan deleted the copilot/fix-tests-9baebba7-5ffe-40c1-88ed-65258167a5ca branch March 4, 2026 08:09
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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@v6 to the v6.3.0 commit.
  • Update expected latest actions/setup-node version returned by repo lookup to v6.3.0.
  • Adjust expected total pin count in sorting test from 30 to 32.

💡 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.

Comment on lines +300 to +302
// 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))
Copy link

Copilot AI Mar 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
// 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")

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants