GoogleContainerTools / GoogleContainerTools/skaffold

schema check baseRef should not be hard-coded

Open
#9,302 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
15.9k
Forks
1.7k
Avg merge
3d 9h
Merged PRs (30d)
10

Description

- https://github.com/GoogleContainerTools/skaffold/blob/88e1c1734ea0f1bd79a0f24783f9565057a0e46a/hack/versions/pkg/schema/check.go#L31 is hard-coded to `origin/main`, this causes schema check fail due to the pull request ref doesn't have schema exist on `origin/main`, the check should be against a target ref that the source ref want to merge in not hard-coded to origin/main
- We may use some github action environment variable to get the base ref and then do the comparison.
- some context https://docs.github.com/en/actions/learn-github-actions/contexts#env-context
- looks like we've already had base_sha , pr_sha injected into env https://github.com/GoogleContainerTools/skaffold/blob/2ea2f08b664b9e45d98df1e6e56d702719e15a2f/.github/workflows/linters-checks.yml#L28-L31
- we may just need to update the base ref to use the env vars

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.