fix(action): correct input names and remove invalid fields in action.yml#110
Open
kranthipoturaju wants to merge 3 commits into
Open
fix(action): correct input names and remove invalid fields in action.yml#110kranthipoturaju wants to merge 3 commits into
kranthipoturaju wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates the GitHub Action metadata by adjusting input definitions (renaming some inputs, removing one input, and relaxing required flags) to change how callers configure snapshots and Go dependency detection.
Changes:
- Renamed
snapshot-sha/snapshot-refinputs tosha/ref. - Removed the
metadatainput from the action interface. - Made
go-mod-pathandgo-build-targetoptional (with defaults) and removedtypedeclarations from several inputs.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+17
to
24
| sha: | ||
| description: The SHA that the results will be linked to in the dependency snapshot | ||
| type: string | ||
| required: false | ||
| default: '' | ||
| snapshot-ref: | ||
| ref: | ||
| description: The ref that the results will be linked to in the dependency snapshot | ||
| type: string | ||
| required: false | ||
| default: '' |
Comment on lines
6
to
12
| description: "GitHub Personal Access Token (PAT). Defaults to PAT provided by Action runner" | ||
| required: false | ||
| default: ${{ github.token }} | ||
| metadata: | ||
| required: false | ||
| description: 'User provided map of max key/value pairs of metadata to include with the snapshot e.g. {"lastModified": "12-31-2022"}' | ||
| go-mod-path: | ||
| required: true | ||
| required: false | ||
| description: 'Repo path to the go.mod file used to detect dependencies for the Go build target. Defaults to go.mod in the root of the repository.' | ||
| default: 'go.mod' |
| description: 'Build target to detect build dependencies. If unspecified, will use "all", with will detect all dependencies used in all build targets (including tests and tools).' | ||
| default: 'all' | ||
| snapshot-sha: | ||
| sha: |
| required: false | ||
| default: '' | ||
| snapshot-ref: | ||
| ref: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Corrects several inaccuracies in
action.ymlthat caused inputs to be non-functional or misrepresented to callers. No behavior changes to the runtime logic — all fixes are confined to the action metadata file.Changes
snapshot-sha→sha: Renamed to matchcore.getInput('sha')called inindex.ts. The old name was never read by the implementation.snapshot-ref→ref: Same — renamed to matchcore.getInput('ref').metadatainput: Declared with a description butcore.getInput('metadata')is never called anywhere in the source; the input had no effect.type:fields:typeis not a valid field for GitHub Actions inputs. It was present onsha,ref,detector-name,detector-version, anddetector-urland was silently ignored by the runner.go-mod-path/go-build-target:required: true→required: false: Both inputs havedefault:values set, makingrequired: truecontradictory — callers are not actually required to supply them.Motivation
The
snapshot-shaandsnapshot-refinputs were documented and exposed to users but never functioned — the implementation readsshaandrefrespectively. Any workflow that set these inputs was silently ignoring them, always falling back to the context SHA/ref.The
required: true+default:combination ongo-mod-pathandgo-build-targetgave callers a false impression that they must provide these values, discouraging use of the built-in defaults.Impact
sha/refrename: Any existing workflow usingsnapshot-shaorsnapshot-refwill need to update toshaandref. Since those inputs were never read by the code, existing workflows were already not benefiting from them — this change makes the feature work for the first time.metadataremoval: No functional impact; the input was a no-op.requiredflag corrections: No runtime impact; purely a documentation fix for tooling and UI that surfaces input metadata.type:removal: No runtime impact; the field was already ignored by the runner.Testing
action.ymlis valid YAML and accepted byaction-validatoror equivalent.sha: <some-sha>andref: refs/heads/some-branchand verify the submitted snapshot reflects those values (previously impossible with the old names).