Skip to content

Conversation

@JimMadge
Copy link
Contributor

@JimMadge JimMadge commented Jun 11, 2024

This PR

  • Adds the undocumented commitType property, which is added by the all contributors bot. There is a PR to add documentation to the all contributors project here
  • Remove the enum from contributions as it is possible to create custom contribution types.
    Valid files with custom contribution types would fail validation using the existing schema.
    I'm not certain it isn't possible but I couldn't find a way to make a list of valid contribution types, which would be the union of the built in types and any types defined in types.
    You cannot know all of the valid values before reading the allcontributorsrc file.

    Use anyOf to so that valid contribution types are either from the list of default contribution types or a string, allowing for custom contributions.
    Perhaps a little redundant as the string option is so permissive.
  • Add tests

@github-actions
Copy link
Contributor

Thanks for the PR!

This section of the codebase is owned by @madskristensen and @hyperupcall - if they write a comment saying "LGTM" then it will be merged.

@hyperupcall
Copy link
Member

hyperupcall commented Jun 11, 2024

Thanks for the PR!

I'm not certain it isn't possible but I couldn't find a way to make a list of valid contribution types, which would be the union of the built in types and any types defined in types

Here's an example - you can use anyOf, and then in the array, list the built-in enums, and then a catch-all string.

@JimMadge
Copy link
Contributor Author

Thanks @hyperupcall!

I've updated the schema with an anyOf. It feels a little redundant as the string option would cover everything in the enum. It might still be useful though as it documents the default values?

@hyperupcall
Copy link
Member

hyperupcall commented Jun 12, 2024

It might still be useful though as it documents the default values?

Yup! And users will get autocompletion / suggestions for every value in the enum

@hyperupcall hyperupcall merged commit 33c8b89 into SchemaStore:master Jun 12, 2024
@hyperupcall
Copy link
Member

Thanks

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