-
Notifications
You must be signed in to change notification settings - Fork 16
feat: add markdown to JSON parser enhancements (label normalization + schema validation) #195
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
Open
Praneel7015
wants to merge
8
commits into
fossunited:develop
Choose a base branch
from
Praneel7015:json
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
38f6170
Add JSON schema for maintainer validation
Praneel7015 8f8361d
feat: add JSON parser Enhancements
Praneel7015 1d2393d
Merge branch 'fossunited:develop' into json
Praneel7015 93e78cf
Update maintainer.schema.json
Praneel7015 2076dab
Fix casing for 'Bluesky' in parse-maintainer.py
Praneel7015 e3b24b8
Update validate_maintainers.py
Praneel7015 6754200
Update validate_maintainers.py
Praneel7015 3fda686
Update validate_maintainers.py
Praneel7015 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # See https://pre-commit.com for more information | ||
| # Install: pip install pre-commit && pre-commit install | ||
| repos: | ||
| - repo: https://github.com/python-jsonschema/check-jsonschema | ||
| rev: 0.29.4 | ||
| hooks: | ||
| - id: check-jsonschema | ||
| name: Validate maintainer JSON files | ||
| files: ^content/maintainers/.*\.json$ | ||
| args: ["--schemafile", "maintainer.schema.json"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,130 @@ | ||
| { | ||
| "$schema": "http://json-schema.org/draft-07/schema#", | ||
| "$id": "https://forklore.org/maintainer.schema.json", | ||
| "title": "Maintainer", | ||
| "description": "Schema for validating maintainer JSON files", | ||
| "type": "object", | ||
| "required": ["username", "full_name", "photo", "socials", "projects", "form"], | ||
| "additionalProperties": false, | ||
| "properties": { | ||
| "username": { | ||
| "type": "string", | ||
| "description": "Unique identifier for the maintainer", | ||
| "minLength": 1 | ||
| }, | ||
| "full_name": { | ||
| "type": "string", | ||
| "description": "Full name of the maintainer", | ||
| "minLength": 1 | ||
| }, | ||
| "photo": { | ||
| "type": "string", | ||
| "description": "URL to the maintainer's photo", | ||
| "format": "uri" | ||
| }, | ||
| "designation": { | ||
| "type": "string", | ||
| "description": "Job title or role description" | ||
| }, | ||
| "socials": { | ||
| "type": "array", | ||
| "description": "List of social media links", | ||
| "items": { | ||
| "type": "object", | ||
| "required": ["label", "link"], | ||
| "additionalProperties": false, | ||
| "properties": { | ||
| "label": { | ||
| "type": "string", | ||
| "description": "Social media platform name", | ||
| "enum": [ | ||
| "GitHub", | ||
| "GitLab", | ||
| "Gitlab", | ||
| "Codeberg", | ||
| "BitBucket", | ||
| "LinkedIn", | ||
| "X", | ||
| "Twitter", | ||
| "Mastodon", | ||
| "Bluesky", | ||
| "Substack", | ||
| "Discourse", | ||
| "Email", | ||
| "RSS", | ||
| "Web" | ||
| ] | ||
| }, | ||
| "link": { | ||
| "type": "string", | ||
| "description": "URL to the social media profile", | ||
| "format": "uri" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "projects": { | ||
| "type": "array", | ||
| "description": "List of projects maintained", | ||
| "items": { | ||
| "type": "object", | ||
| "required": ["name", "project_link", "description", "short_description"], | ||
| "additionalProperties": false, | ||
| "properties": { | ||
| "name": { | ||
| "type": "string", | ||
| "description": "Name of the project", | ||
| "minLength": 1 | ||
| }, | ||
| "project_link": { | ||
| "type": "string", | ||
| "description": "URL to the project repository", | ||
| "format": "uri" | ||
| }, | ||
| "website_link": { | ||
| "type": "string", | ||
| "description": "URL to the project website", | ||
| "format": "uri" | ||
| }, | ||
| "logo": { | ||
| "type": "string", | ||
| "description": "URL to the project logo", | ||
| "format": "uri" | ||
| }, | ||
| "description": { | ||
| "type": "string", | ||
| "description": "Full description of the project" | ||
| }, | ||
| "short_description": { | ||
| "type": "string", | ||
| "description": "Short description used in cards and meta" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "form": { | ||
| "type": "array", | ||
| "description": "Q&A form responses", | ||
| "items": { | ||
| "type": "object", | ||
| "required": ["question", "response"], | ||
| "additionalProperties": false, | ||
| "properties": { | ||
| "question": { | ||
| "type": "string", | ||
| "description": "The question text" | ||
| }, | ||
| "response": { | ||
| "type": "string", | ||
| "description": "The maintainer's response" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "created_on": { | ||
| "type": "string", | ||
| "description": "ISO 8601 timestamp of when the entry was created", | ||
| "format": "date-time" | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the schema file is available next to this file, will there be a case where it won't be found? I think this check would be redundant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that i think about it, you're right. i dont think there will be a case where that occurs