chore: dsconfig base schema - github#771
Open
yesoreyeram wants to merge 5 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a dsconfig-backed base schema for the GitHub datasource plugin, commits the generated schema artifacts, and ensures those artifacts ship with the built plugin bundle. It also adjusts backend settings parsing to tolerate legacy appId/installationId representations and updates dependencies/build wiring accordingly.
Changes:
- Introduce dsconfig schema source (
pkg/schema/dsconfig.json), Go helpers/tests, and generated schema artifacts (pkg/schema/*.gen.json). - Package schema artifacts (and skills) into
dist/via a new rootwebpack.config.tsand updatedpackage.jsonbuild/dev scripts. - Normalize legacy
appId/installationIdparsing inpkg/models/settings.goand update tests; minor test determinism fix and SDK config API update.
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| webpack.config.ts | Extends scaffolded webpack config to copy schema artifacts (and skills) into the built bundle. |
| pkg/schema/dsconfig.json | Adds dsconfig “single source of truth” schema for plugin settings. |
| pkg/schema/schema.go | Embeds dsconfig schema and produces SDK plugin schema object. |
| pkg/schema/schema_test.go | Adds artifact generation via go generate and runs dsconfig conformance tests. |
| pkg/schema/schema.gen.json | Committed generated plugin schema (v0alpha1). |
| pkg/schema/settings.gen.json | Committed generated settings schema (v0alpha1). |
| pkg/schema/settings.examples.gen.json | Committed generated settings examples artifact. |
| pkg/models/settings.go | Adds legacy-tolerant JSON unmarshal for appId/installationId and adds githubPlan for frontend parity. |
| pkg/models/settings_test.go | Updates expectations for the new normalized appId/installationId representation. |
| pkg/github/stargazers_test.go | Makes time zone formatting deterministic for golden output. |
| pkg/github/sql_handler_test.go | Switches to config.NewGrafanaCfg per updated plugin SDK API. |
| package.json | Bumps version and switches build/dev scripts to use the new root webpack config. |
| go.mod | Updates Go/tooling and dependency versions; adds dsconfig modules. |
| go.sum | Updates module checksums to match go.mod changes. |
| cspell.config.json | Adds dsconfig-related words and formats ignore list. |
| CHANGELOG.md | Documents 2.8.2 changes and adjusts prior formatting. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
backend.NewGrafanaCfgtoconfig.NewGrafanaCfg( changes in plugin SDK ). Old property deprecated and so the plugin is failing with lintgithubPlanin backend settings model for feature parity with frontend.