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

example fails yaml validation #746

Open
2 of 5 tasks
boneskull opened this issue Jan 17, 2024 · 5 comments
Open
2 of 5 tasks

example fails yaml validation #746

boneskull opened this issue Jan 17, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@boneskull
Copy link

Description:

The example in the README fails YAML schema validation in VSCode

Action version:

v5.0.0

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Repro steps:

  1. Create a new labeler.yml in .github
  2. Paste this (from the example):
    # Add 'source' label to any change to src files within the source dir EXCEPT for the docs sub-folder
    source:
    - all:
      - changed-files:
        - any-glob-to-any-file: 'src/**/*'
        - all-globs-to-all-files: '!src/docs/*'
  3. See error: image image

Expected behavior:
No validation error

Actual behavior:
See screenshots

@HarithaVattikuti
Copy link
Contributor

Hello @boneskull
Thank you for creating this issue. We will investigate it and get back to you as soon as we have some feedback.

@CRC-Mismatch
Copy link

CRC-Mismatch commented Jan 31, 2024

This seems to be related to the schema published on https://json.schemastore.org/pull-request-labeler.json being out-of-date.

I'm not sure if that's the same one used by VSCode, but I can see the same validation failure in current Jetbrains IDEs, and they automatically fetch the schemas from there.

@boneskull
Copy link
Author

To fix that, a PR should be created in the schemastore repo

@QuLogic
Copy link

QuLogic commented Feb 7, 2024

I've written an updated schema that should be available already: https://json.schemastore.org/pull-request-labeler-5.json

I don't know whether VSCode actually uses those schemas though.

@hyperupcall
Copy link

I don't know whether VSCode actually uses those schemas though

VSCode itself won't with YAML files, but will do so with an extension, like the Red Hat YAML Extension

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants