Skip to content

Conversation

@ericsciple
Copy link
Collaborator

@ericsciple ericsciple commented Jan 7, 2026

Follow-up to PR:

What this fixes

Autocomplete was broken inside composite action steps. When you typed inside a step and triggered autocomplete, nothing showed up. Now you correctly get suggestions like run, uses, shell, etc.

Duplicate error messages for missing required fields. When a required field was missing (like main for Node.js actions), users saw two error messages - one generic schema validation error, and one custom error with a clear explanation. Now they only see the custom one.

For example, with using: node24 but no main:

  • Before: Two errors shown
    • Schema: "There's not enough info to determine what you meant. Add one of these properties: args, entrypoint, image, main, ..."
    • Custom: "'main' is required for Node.js actions (using: node24)"
  • After: Only the custom error is shown

@ericsciple ericsciple force-pushed the users/ericsciple/26-01-using2 branch 2 times, most recently from 0c6c44f to c55395f Compare January 7, 2026 06:38
@ericsciple ericsciple changed the title Fix nested completion in action.yml and filter duplicate schema errors Fix completion and validation issues in action.yml Jan 7, 2026
@ericsciple ericsciple force-pushed the users/ericsciple/26-01-using2 branch 6 times, most recently from 3ead40f to 9cef0a8 Compare January 7, 2026 07:01
Follow-up to #289

## What this fixes

**Autocomplete was broken inside composite action steps.** When you typed inside a step and triggered autocomplete, nothing showed up. Now you correctly get suggestions like run, uses, shell, etc.

**Duplicate error messages for missing required fields.** When a required field was missing (like main for Node.js actions), users saw two error messages - one generic schema validation error, and one custom error with a clear explanation. Now they only see the custom one.

For example, with using: node24 but no main:
- Before: Two errors shown
  - Schema: "There's not enough info to determine what you meant. Add one of these properties: args, entrypoint, image, main, ..."
  - Custom: "'main' is required for Node.js actions (using: node24)"
- After: Only the custom error is shown
@ericsciple ericsciple force-pushed the users/ericsciple/26-01-using2 branch from 9cef0a8 to 0b66d48 Compare January 7, 2026 07:05
@ericsciple ericsciple marked this pull request as ready for review January 7, 2026 07:08
@ericsciple ericsciple requested a review from a team as a code owner January 7, 2026 07:08
Copilot AI review requested due to automatic review settings January 7, 2026 07:08
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

This PR fixes two issues with GitHub Actions action.yml language services: broken autocomplete inside composite action steps and duplicate error messages for missing required fields.

  • Refactored validation logic to filter out redundant schema errors when custom, more specific error messages are provided
  • Fixed completion filtering logic to correctly detect when the user is completing inside nested structures like composite action steps
  • Added comprehensive test coverage for both fixes

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
languageservice/src/validate-action.ts Refactored validateRunsKeys to validateRunsKeysAndFilterErrors which now filters redundant schema errors in-place when custom diagnostics provide better error messages
languageservice/src/validate-action.test.ts Added 8 new test cases covering duplicate error filtering scenarios including missing required keys, different action types, and edge cases
languageservice/src/complete.ts Simplified the logic for detecting nested completion contexts by checking if runsMapping appears before the end of the path, rather than finding the last mapping
languageservice/src/complete-action.test.ts Added test verifying that step-level keys (run, uses, shell, etc.) are available when completing inside composite action steps

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ericsciple ericsciple merged commit 7823148 into main Jan 7, 2026
13 checks passed
@ericsciple ericsciple deleted the users/ericsciple/26-01-using2 branch January 7, 2026 14:43
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