Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(gitlabci): Use schema for dep extraction #33586

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

zharinov
Copy link
Collaborator

Changes

Context

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@rarkins rarkins requested review from viceice and secustor January 14, 2025 13:03
lib/modules/manager/gitlabci/schema.ts Outdated Show resolved Hide resolved
const docs = parseYaml<GitlabPipeline>(content, {
uniqueKeys: false,
});
const docs = parseYaml(content, { uniqueKeys: false });
Copy link
Member

Choose a reason for hiding this comment

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

why not using yaml schema helper?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Because it doesn't use uniqueKeys option

Copy link
Member

Choose a reason for hiding this comment

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

ok, we probably should create a new helper for it? 🙃

why not passing the schema as customSchema via options?

@zharinov zharinov requested a review from viceice January 16, 2025 22:01
@rarkins rarkins enabled auto-merge January 17, 2025 06:13
const docs = parseYaml<GitlabPipeline>(content, {
uniqueKeys: false,
});
const docs = parseYaml(content, { uniqueKeys: false });
Copy link
Member

Choose a reason for hiding this comment

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

ok, we probably should create a new helper for it? 🙃

why not passing the schema as customSchema via options?

Comment on lines +21 to +22
const docs = parseYaml(content, { uniqueKeys: false });
for (const dep of GitlabDocumentArray.parse(docs)) {
Copy link
Member

Choose a reason for hiding this comment

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

pass schema via customSchema option to parseYaml

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.

2 participants