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

GitHub issue schema does not support dropdown default option #3301

Closed
andrewvaughan opened this issue Oct 10, 2023 · 2 comments
Closed

GitHub issue schema does not support dropdown default option #3301

andrewvaughan opened this issue Oct 10, 2023 · 2 comments
Labels
help wanted issue:bug Report errors or unexpected behavior (auto-generated by issue forms)

Comments

@andrewvaughan
Copy link

Area with issue?

JSON Schema

✔️ Expected Behavior

This should work:

  - type: dropdown
    id: consistency
    attributes:
      label: How consistent is this bug?
      description: Is this something that always happens, or comes and goes?
      options:
        - Occurs consistently
        - It is on and off
        - It happened one or two times
        - Other
      default: 0

This is valid per the GitHub documentation:

https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#attributes-for-dropdown

❌ Actual Behavior

This fails. For example, with https://github.com/oxsecurity/megalinter running https://github.com/chris48s/v8r:

 Linted [YAML] files with [v8r]: Found 1 error(s) - (4.97s)
- Using [v8r v2.0.0] https://megalinter.io/7.4.0/descriptors/yaml_v8r
- MegaLinter key: [YAML_V8R]
- Rules config: identified by [v8r]
- Number of files analyzed: [9]
--Error detail:

...skipping prior...


ℹ Processing ./.github/ISSUE_TEMPLATE/BUG_REPORT.yml
ℹ Found schema in https://www.schemastore.org/api/json/catalog.json ...
ℹ Validating ./.github/ISSUE_TEMPLATE/BUG_REPORT.yml against schema from https://json.schemastore.org/github-issue-forms.json ...
✖ ./.github/ISSUE_TEMPLATE/BUG_REPORT.yml is invalid

./.github/ISSUE_TEMPLATE/BUG_REPORT.yml#/body/9/attributes must NOT have additional properties
./.github/ISSUE_TEMPLATE/BUG_REPORT.yml#/body/9 must match "then" schema

ℹ Processing ./.github/ISSUE_TEMPLATE/DOCUMENTATION_REQUEST.yml
ℹ Found schema in https://www.schemastore.org/api/json/catalog.json ...
ℹ Validating ./.github/ISSUE_TEMPLATE/DOCUMENTATION_REQUEST.yml against schema from https://json.schemastore.org/github-issue-forms.json ...
✖ ./.github/ISSUE_TEMPLATE/DOCUMENTATION_REQUEST.yml is invalid

./.github/ISSUE_TEMPLATE/DOCUMENTATION_REQUEST.yml#/body/1/attributes must NOT have additional properties
./.github/ISSUE_TEMPLATE/DOCUMENTATION_REQUEST.yml#/body/1 must match "then" schema
./.github/ISSUE_TEMPLATE/DOCUMENTATION_REQUEST.yml#/body/3/attributes must NOT have additional properties
./.github/ISSUE_TEMPLATE/DOCUMENTATION_REQUEST.yml#/body/3 must match "then" schema

ℹ Processing ./.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml
ℹ Found schema in https://www.schemastore.org/api/json/catalog.json ...
ℹ Validating ./.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml against schema from https://json.schemastore.org/github-issue-forms.json ...
✖ ./.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml is invalid

./.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml#/body/4/attributes must NOT have additional properties
./.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml#/body/4 must match "then" schema

ℹ Processing ./.github/ISSUE_TEMPLATE/OPERATIONAL_REQUEST.yml
ℹ Found schema in https://www.schemastore.org/api/json/catalog.json ...
ℹ Validating ./.github/ISSUE_TEMPLATE/OPERATIONAL_REQUEST.yml against schema from https://json.schemastore.org/github-issue-forms.json ...
✖ ./.github/ISSUE_TEMPLATE/OPERATIONAL_REQUEST.yml is invalid

./.github/ISSUE_TEMPLATE/OPERATIONAL_REQUEST.yml#/body/2/attributes must NOT have additional properties
./.github/ISSUE_TEMPLATE/OPERATIONAL_REQUEST.yml#/body/2 must match "then" schema


...skipping remainder...

YAML or JSON file that does not work.

No response

IDE or code editor.

Visual Studio Code

Are you making a PR for this?

No, someone else must create the PR.

@andrewvaughan andrewvaughan added the issue:bug Report errors or unexpected behavior (auto-generated by issue forms) label Oct 10, 2023
@andrewvaughan
Copy link
Author

andrewvaughan commented Oct 10, 2023

It looks like this was added in August:

github/docs@2640843

This will become a pretty big issue for people soon - I imagine GitHub issue forms are a major usage case for SchemaStore.

@hyperupcall
Copy link
Member

Fixed by #3452

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted issue:bug Report errors or unexpected behavior (auto-generated by issue forms)
Projects
None yet
Development

No branches or pull requests

2 participants