Skip to content

Commit d64000e

Browse files
yesoreyeramCopilotkevinwcyu
authored
dsconfig: base (#771)
* dsconfig: base schema * updated version and changelog * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * addressed review comments * updated schema * revert changelog * revert changelog * updated with examples * updated schema version * updated changelog and version * restore instructions * update contributing.md --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Kevin Yu <kevinwcyu@users.noreply.github.com>
1 parent 34a7522 commit d64000e

15 files changed

Lines changed: 931 additions & 16 deletions

‎CONTRIBUTING.md‎

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,51 @@ Thank you for your interest in contributing to this repository. We are glad you
1010
## Next steps
1111

1212
- [Set up your development environment](./docs/developer-guide.md)
13+
14+
## Data source configuration schema
15+
16+
[`pkg/schema/dsconfig.json`](./pkg/schema/dsconfig.json) describes the plugin's configuration fields, storage locations, validation rules, UI hints, and instructions for automation. Edit this file when changing the configuration schema.
17+
18+
The format and shared tooling come from [`grafana/dsconfig`](https://github.com/grafana/dsconfig/tree/main/dsconfig):
19+
20+
- [README](https://github.com/grafana/dsconfig/tree/main/dsconfig#readme): concepts and examples.
21+
- [Schema reference](https://github.com/grafana/dsconfig/blob/main/dsconfig/schema.md): field properties and validation rules.
22+
- [Publishing guide](https://github.com/grafana/dsconfig/blob/main/dsconfig/PUBLISH-SCHEMA.md): generation and packaging setup.
23+
24+
### Source and generated files
25+
26+
| File | Purpose |
27+
| --- | --- |
28+
| `pkg/schema/dsconfig.json` | Hand-authored configuration schema. |
29+
| `pkg/models/settings.go` | Backend settings model, parsing, and `SecureJsonDataKeys`. |
30+
| `pkg/schema/dsconfig_test.go` | Shared conformance test setup and provisioning examples. |
31+
| `pkg/schema/schema.gen.json` | Generated plugin schema. |
32+
| `pkg/schema/settings.gen.json` | Generated settings schema. |
33+
| `pkg/schema/settings.examples.gen.json` | Generated provisioning examples. |
34+
35+
Do not edit `.gen.json` files by hand. The generator uses the version of `github.com/grafana/dsconfig/schema` pinned in `go.mod`. The `$schema` URL in `dsconfig.json` identifies the JSON Schema used to validate the authoring format; review that pin when upgrading dsconfig.
36+
37+
### Updating configuration
38+
39+
1. Update `pkg/schema/dsconfig.json`, including any relevant groups, validation rules, and instructions. Keep stored fields consistent with the configuration editor and backend. A virtual field represents a UI control rather than a saved setting.
40+
2. Update `models.Settings` and its JSON tags where needed. For secrets, update `models.SecureJsonDataKeys` and the code that reads `DecryptedSecureJSONData` instead of adding a normal JSON setting. Preserve support for existing configurations when changing types, including string and numeric GitHub App IDs.
41+
3. Update `SettingsExamples` in `pkg/schema/dsconfig_test.go` when the configuration examples change. The existing examples cover personal access tokens, GitHub Apps, Enterprise Cloud, and Enterprise Server. Use placeholders, never real credentials.
42+
4. Regenerate the artifacts from the repository root:
43+
44+
```bash
45+
go generate ./pkg/schema/...
46+
```
47+
48+
5. Verify schema consistency and backend parsing:
49+
50+
```bash
51+
go test ./pkg/schema/... ./pkg/models/... -count=1
52+
```
53+
54+
6. Review and commit any generated changes alongside the source changes. An instructions-only edit may leave the generated artifacts unchanged.
55+
56+
The `go:generate` directive in `dsconfig_test.go` runs `go test -run TestPlugin -generateArtifacts`. Normal test runs check the artifacts without regenerating them. A `SchemaArtifactInSync` failure means regeneration is needed; key, type, or secret consistency failures require correcting the schema or Go declarations.
57+
58+
### Building the published files
59+
60+
Run `npm run build` to copy the source schema and generated artifacts into the plugin's `dist/schema/` directory via `webpack.config.ts`. This packages the files; it does not replace the Go generation step. Grafana serves the source schema at `/public/plugins/grafana-github-datasource/schema/dsconfig.json` once that build is installed.

‎cspell.config.json‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
],
1919
"words": [
2020
"apiserver",
21+
"dsconfig",
22+
"dsschema",
2123
"dataplane",
2224
"araddon",
2325
"bmike",
@@ -56,6 +58,8 @@
5658
"octocat",
5759
"oldorg",
5860
"oldrepo",
61+
"pluginschema",
62+
"unconfigured",
5963
"prismjs",
6064
"promop",
6165
"PTRACE",

‎go.mod‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ go 1.26.5
55
require (
66
github.com/bradleyfalzon/ghinstallation/v2 v2.19.0
77
github.com/google/go-github/v84 v84.0.0
8+
github.com/grafana/dsconfig/schema v0.0.12
89
github.com/grafana/grafana-plugin-sdk-go v0.296.4
910
github.com/influxdata/tdigest v0.0.1
1011
github.com/pkg/errors v0.9.1
1112
github.com/shurcooL/githubv4 v0.0.0-20260209031235-2402fdf4a9ed
1213
github.com/stretchr/testify v1.12.1
1314
golang.org/x/oauth2 v0.37.0
15+
k8s.io/kube-openapi v0.0.0-20260721132016-d427ff9ee9ad
1416
pgregory.net/rapid v1.3.0
1517
)
1618

@@ -21,23 +23,41 @@ require (
2123
github.com/clipperhouse/displaywidth v0.11.0 // indirect
2224
github.com/clipperhouse/uax29/v2 v2.7.0 // indirect
2325
github.com/cpuguy83/go-md2man/v2 v2.0.7 // indirect
26+
github.com/emicklei/go-restful/v3 v3.13.0 // indirect
2427
github.com/fatih/color v1.19.0 // indirect
2528
github.com/go-logr/logr v1.4.4 // indirect
2629
github.com/go-logr/stdr v1.2.2 // indirect
30+
github.com/go-openapi/jsonpointer v1.0.0 // indirect
31+
github.com/go-openapi/jsonreference v1.0.0 // indirect
32+
github.com/go-openapi/swag v0.28.0 // indirect
33+
github.com/go-openapi/swag/cmdutils v0.28.0 // indirect
34+
github.com/go-openapi/swag/conv v0.28.0 // indirect
35+
github.com/go-openapi/swag/fileutils v0.28.0 // indirect
36+
github.com/go-openapi/swag/jsonutils v0.28.0 // indirect
37+
github.com/go-openapi/swag/loading v0.28.0 // indirect
38+
github.com/go-openapi/swag/mangling v0.28.0 // indirect
39+
github.com/go-openapi/swag/netutils v0.28.0 // indirect
40+
github.com/go-openapi/swag/pools v0.28.0 // indirect
41+
github.com/go-openapi/swag/stringutils v0.28.0 // indirect
42+
github.com/go-openapi/swag/typeutils v0.28.0 // indirect
43+
github.com/go-openapi/swag/yamlutils v0.28.0 // indirect
2744
github.com/goccy/go-json v0.10.6 // indirect
2845
github.com/gogo/googleapis v1.4.1 // indirect
2946
github.com/gogo/protobuf v1.3.2 // indirect
3047
github.com/golang-jwt/jwt/v4 v4.5.2 // indirect
48+
github.com/google/gnostic-models v0.7.1 // indirect
3149
github.com/google/go-github/v88 v88.0.0 // indirect
3250
github.com/google/go-querystring v1.2.0 // indirect
3351
github.com/google/uuid v1.6.0 // indirect
52+
github.com/grafana/dsconfig/dsconfig v0.0.7 // indirect
3453
github.com/grafana/otel-profiling-go v0.6.0 // indirect
3554
github.com/grafana/pyroscope-go/godeltaprof v0.1.12 // indirect
3655
github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.1.0 // indirect
3756
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.4 // indirect
3857
github.com/grpc-ecosystem/grpc-gateway/v2 v2.30.0 // indirect
3958
github.com/jaegertracing/jaeger-idl v0.12.0 // indirect
4059
github.com/json-iterator/go v1.1.12 // indirect
60+
github.com/jszwedko/go-datemath v0.1.1-0.20260113213115-7f666eef0523 // indirect
4161
github.com/klauspost/compress v1.20.0 // indirect
4262
github.com/klauspost/cpuid/v2 v2.4.0 // indirect
4363
github.com/mattn/go-colorable v0.1.15 // indirect
@@ -68,11 +88,14 @@ require (
6888
go.opentelemetry.io/otel/sdk v1.46.0 // indirect
6989
go.opentelemetry.io/otel/trace v1.46.0 // indirect
7090
go.opentelemetry.io/proto/otlp v1.11.0 // indirect
91+
go.yaml.in/yaml/v2 v2.4.4 // indirect
7192
go.yaml.in/yaml/v3 v3.0.5 // indirect
7293
golang.org/x/exp v0.0.0-20260908205506-85c1c2202aba // indirect
7394
google.golang.org/genproto/googleapis/api v0.0.0-20260819154853-08b0e4226688 // indirect
7495
google.golang.org/genproto/googleapis/rpc v0.0.0-20260825221802-da73d73af1c5 // indirect
7596
gopkg.in/fsnotify/fsnotify.v1 v1.4.7 // indirect
97+
sigs.k8s.io/randfill v1.0.0 // indirect
98+
sigs.k8s.io/yaml v1.6.0 // indirect
7699
)
77100

78101
require (

‎go.sum‎

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
3535
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
3636
github.com/elazarl/goproxy v1.9.0 h1:2j3c13lD5v0QTjxphJSSIHS7w8/m/pzSHtLMPOpznC0=
3737
github.com/elazarl/goproxy v1.9.0/go.mod h1:THdE5ix2clxX9lZzcICPpZ67d6CdrPZxdOYsNgU5e30=
38+
github.com/emicklei/go-restful/v3 v3.13.0 h1:C4Bl2xDndpU6nJ4bc1jXd+uTmYPVUwkD6bFY/oTyCes=
39+
github.com/emicklei/go-restful/v3 v3.13.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
3840
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
3941
github.com/fatih/color v1.19.0 h1:Zp3PiM21/9Ld6FzSKyL5c/BULoe/ONr9KlbYVOfG8+w=
4042
github.com/fatih/color v1.19.0/go.mod h1:zNk67I0ZUT1bEGsSGyCZYZNrHuTkJJB+r6Q9VuMi0LE=
@@ -51,6 +53,38 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
5153
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
5254
github.com/go-openapi/jsonpointer v1.0.0 h1:kR9tHqY0CtZaOPVFm622dPVNhrvYpwr4uCxgL3h1H8s=
5355
github.com/go-openapi/jsonpointer v1.0.0/go.mod h1:Z3rw7dWu1p9IgitXCFamSlA5lmDiklEB6vkaxcNZW5Y=
56+
github.com/go-openapi/jsonreference v1.0.0 h1:jlmTr6torcd1YgDQvSfNmRtKzYDO4FGBkrAdlAVWnpY=
57+
github.com/go-openapi/jsonreference v1.0.0/go.mod h1:jtwdyGbJk0Xhe5Y+rwtglQP6Sb1WZST4rT32LWB+sv0=
58+
github.com/go-openapi/swag v0.28.0 h1:xkgbOSKj6DZziNpyqRRAOt3GJGtgjgsd2RoyT30VWuw=
59+
github.com/go-openapi/swag v0.28.0/go.mod h1:4qYnT3Cqr1p1VknOdPo70evN4rgQnAg6jwApHyxSGIg=
60+
github.com/go-openapi/swag/cmdutils v0.28.0 h1:7TOeNtkYru1SG8Y34tDh9WBbLsMqGnptuxWiHREPZ4Q=
61+
github.com/go-openapi/swag/cmdutils v0.28.0/go.mod h1:Sm1MVFMkF6guJJ+pQqHnQA3N0j9qALV3NxzDSv6bETM=
62+
github.com/go-openapi/swag/conv v0.28.0 h1:GtqqbyFe7vR5Y7ehxG9W6/OvrSFdf1OLeTGp40TqxH8=
63+
github.com/go-openapi/swag/conv v0.28.0/go.mod h1:mbUE+mzctnhxi864m0Q07SpN8OowD9JhxmxuYvZZD/k=
64+
github.com/go-openapi/swag/fileutils v0.28.0 h1:Z04XWQD7R8Eq+7GnOrjovBxPPmZzsS4gt2H2GPGIViU=
65+
github.com/go-openapi/swag/fileutils v0.28.0/go.mod h1:VvJFZLTZS0AI854gEQz5tk7dBESdLjiNUMSZ/th2ry8=
66+
github.com/go-openapi/swag/jsonutils v0.28.0 h1:YIch6FwO7RXzeAnbO8Tu7dWBZeUEH+4nA0HXltVTnv4=
67+
github.com/go-openapi/swag/jsonutils v0.28.0/go.mod h1:CYM3WlTUcagR2ZoHdz54di/cbBqt82tuxuXgAjxw+mg=
68+
github.com/go-openapi/swag/jsonutils/fixtures_test v0.28.0 h1:qV+VVUAx5Oro8WjVWpZeql7YReTKhT4smR4zhcOQZr0=
69+
github.com/go-openapi/swag/jsonutils/fixtures_test v0.28.0/go.mod h1:mofwUWx70wvskwESqRJ//k/9kURmCgyJl5m5Ppoh5kY=
70+
github.com/go-openapi/swag/loading v0.28.0 h1:td8QZdZC9MIYGGSnSPKShKiK22I2tU5UQvuUhIBPRLU=
71+
github.com/go-openapi/swag/loading v0.28.0/go.mod h1:rXB0QiQX5mMveXEA7ouM4KiiM9jVJe4K6BVbwhD1M4k=
72+
github.com/go-openapi/swag/mangling v0.28.0 h1:pH8eyeNO9SLYsTMWJrurnNfKmDa28XrlA+HePVD53VM=
73+
github.com/go-openapi/swag/mangling v0.28.0/go.mod h1:jtBE2+V+3pILxOR7Vgce+Cwp6A2PgZbvVqfNntbVs0w=
74+
github.com/go-openapi/swag/netutils v0.28.0 h1:YXN6TALEi2pzts8/8GNm6T61HTAZsieukGZidap989k=
75+
github.com/go-openapi/swag/netutils v0.28.0/go.mod h1:J+WYyFMLtvtCGqa6jLv+YNUmIKI3ZRQRrvfNDMoQoEQ=
76+
github.com/go-openapi/swag/pools v0.28.0 h1:HPMZWSAfce3rdVTFcjFiCIBtDg9h4x2QlRrHipwhxeU=
77+
github.com/go-openapi/swag/pools v0.28.0/go.mod h1:kVQefhSK5RWuRe7BXsL8htgBPAMpN7HDGpGEknqugeE=
78+
github.com/go-openapi/swag/stringutils v0.28.0 h1:ixsc9iYgDPubHL/8nSkbnryEHpD2VRlBMLKpQyPXcDU=
79+
github.com/go-openapi/swag/stringutils v0.28.0/go.mod h1:lzRN95CxXmA03XcDWHLOb6nOMcxCqR5rGY0lOgsfRoM=
80+
github.com/go-openapi/swag/typeutils v0.28.0 h1:nRBKSBXjDgf01VDPB3fWeD9nQuhCOVeIYAkUx2tbkyY=
81+
github.com/go-openapi/swag/typeutils v0.28.0/go.mod h1:Srm0xFNRZ1Y+vCxJclo5qzx8aj+1pAKda/YfFPrG0dQ=
82+
github.com/go-openapi/swag/yamlutils v0.28.0 h1:TV3JXH6DS46KUroDtMLAYHGkdWf5VDq3wVWFirmzROY=
83+
github.com/go-openapi/swag/yamlutils v0.28.0/go.mod h1:x0q/yndZHEgk9Rx3DyDqzFUmHy55KTvIZldvF2dTJXs=
84+
github.com/go-openapi/testify/enable/yaml/v2 v2.6.0 h1:gGHwAJ0R/5jU8BEGDbfRNR3hL68dAVi84WuOApp29B0=
85+
github.com/go-openapi/testify/enable/yaml/v2 v2.6.0/go.mod h1:tY+St1SGq4NFl0QIqdTY4aEdbChAHxhyB77XQi9iJCo=
86+
github.com/go-openapi/testify/v2 v2.6.0 h1:5PKH2HE7YJ/LuRPQGvSxBRlFXNQhSetBLlGAgUEu3ug=
87+
github.com/go-openapi/testify/v2 v2.6.0/go.mod h1:SgsVHtfooshd0tublTtJ50FPKhujf47YRqauXXOUxfw=
5488
github.com/goccy/go-json v0.10.6 h1:p8HrPJzOakx/mn/bQtjgNjdTcN+/S6FcG2CTtQOrHVU=
5589
github.com/goccy/go-json v0.10.6/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
5690
github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0=
@@ -63,6 +97,8 @@ github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek
6397
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
6498
github.com/google/flatbuffers v25.12.19+incompatible h1:haMV2JRRJCe1998HeW/p0X9UaMTK6SDo0ffLn2+DbLs=
6599
github.com/google/flatbuffers v25.12.19+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8=
100+
github.com/google/gnostic-models v0.7.1 h1:SisTfuFKJSKM5CPZkffwi6coztzzeYUhc3v4yxLWH8c=
101+
github.com/google/gnostic-models v0.7.1/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7OUGxBlw57miDrQ=
66102
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
67103
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
68104
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
@@ -80,6 +116,10 @@ github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e h1:JKmoR8x90Iww1
80116
github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
81117
github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=
82118
github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=
119+
github.com/grafana/dsconfig/dsconfig v0.0.7 h1:rh2PhwKLVrokMa2eTbS3zDfSIS8sOl54X/as082+Qgo=
120+
github.com/grafana/dsconfig/dsconfig v0.0.7/go.mod h1:orwL9W2Ea8Wjubn0Vw1or/uolFDSKSFfc404G2xrvEc=
121+
github.com/grafana/dsconfig/schema v0.0.12 h1:WQFlKzJtACotG3fcNnU+RcnBMDXxgSAuAphkF2nlyz0=
122+
github.com/grafana/dsconfig/schema v0.0.12/go.mod h1:kBZ/uoNZw6QjYU/eCS2wdBckerbv7zTWLtgy+9Hm8LQ=
83123
github.com/grafana/grafana-plugin-sdk-go v0.296.4 h1:3+sYR2lmdb+sIk3m/eA9/lY8sztbhFyGf+6he8nwKuM=
84124
github.com/grafana/grafana-plugin-sdk-go v0.296.4/go.mod h1:Dza5QLa5L5/0zH6Ce2CZhfTUd6+3FFDhmEHjT0BEBuM=
85125
github.com/grafana/otel-profiling-go v0.6.0 h1:W7lOZaJj4IJISXMcM1UBk3fJF3tzF2OD6MJBJaQp1H8=
@@ -106,6 +146,8 @@ github.com/jhump/protoreflect v1.17.0 h1:qOEr613fac2lOuTgWN4tPAtLL7fUSbuJL5X5Xum
106146
github.com/jhump/protoreflect v1.17.0/go.mod h1:h9+vUUL38jiBzck8ck+6G/aeMX8Z4QUY/NiJPwPNi+8=
107147
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
108148
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
149+
github.com/jszwedko/go-datemath v0.1.1-0.20260113213115-7f666eef0523 h1:yho2Mr8EZHU24v7/vMyMc3yPvbs9GDK7TtFRtuMPGqE=
150+
github.com/jszwedko/go-datemath v0.1.1-0.20260113213115-7f666eef0523/go.mod h1:WrYiIuiXUMIvTDAQw97C+9l0CnBmCcvosPjN3XDqS/o=
109151
github.com/jtolds/gls v4.2.1+incompatible h1:fSuqC+Gmlu6l/ZYAoZzx2pyucC8Xza35fpRVWLVmUEE=
110152
github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
111153
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
@@ -310,5 +352,15 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
310352
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
311353
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
312354
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
355+
k8s.io/kube-openapi v0.0.0-20260721132016-d427ff9ee9ad h1:oXImqH8mQNk7PmvzKhmN3ddJoY6OnyM225MXwGHPm0A=
356+
k8s.io/kube-openapi v0.0.0-20260721132016-d427ff9ee9ad/go.mod h1:0/mqHCVhlumdJ3BhCfnjSZQE037nAhNodh1/hK0T8/I=
357+
k8s.io/utils v0.0.0-20260707023825-cf1189d6abe3 h1:jVkFFVfXdXP74B/zbO3hM3hpSFD0xvhQ5U686DPurkE=
358+
k8s.io/utils v0.0.0-20260707023825-cf1189d6abe3/go.mod h1:M2s5JB1lIYP3jzZdorPLHXIPJzt9vv2muW5a6L9DtNM=
313359
pgregory.net/rapid v1.3.0 h1:vBvO0VSqti75J1jjYqpgPNBLKMd1+gxa9fYo7vk/Exc=
314360
pgregory.net/rapid v1.3.0/go.mod h1:dPlE4OBBxgXPqkP79flB6sJL1dx5azpI7HQ9MY9Z7uk=
361+
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg=
362+
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg=
363+
sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU=
364+
sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY=
365+
sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs=
366+
sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4=

‎package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"license": "Apache-2.0",
88
"author": "Grafana Labs <team@grafana.com> (https://grafana.com)",
99
"scripts": {
10-
"build": "webpack -c ./.config/webpack/webpack.config.ts --env production",
11-
"dev": "webpack -w -c ./.config/webpack/webpack.config.ts --env development",
10+
"build": "webpack -c ./webpack.config.ts --env production",
11+
"dev": "webpack -w -c ./webpack.config.ts --env development",
1212
"e2e": "playwright test",
1313
"lint": "eslint --cache .",
1414
"lint:fix": "npm run lint -- --fix && prettier --write --list-different .",

‎pkg/github/stargazers_test.go‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ func TestStargazersDataframe(t *testing.T) {
4444
t.Fatal(err)
4545
}
4646

47+
// Force a fixed +0000 zone so the rendered time is deterministic across
48+
// environments/Go versions (always "+0000" instead of "UTC"/"GMT").
49+
starredAt = starredAt.In(time.FixedZone("", 0))
50+
4751
stargazers := StargazersWrapper{
4852
StargazerWrapper{
4953
Stargazer: Stargazer{

‎pkg/main.go‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@ import (
66
"github.com/grafana/grafana-plugin-sdk-go/backend"
77
"github.com/grafana/grafana-plugin-sdk-go/backend/datasource"
88

9+
"github.com/grafana/github-datasource/pkg/models"
910
"github.com/grafana/github-datasource/pkg/plugin"
1011
)
1112

12-
const dsID = "grafana-github-datasource"
13-
1413
func main() {
15-
if err := datasource.Manage(dsID, plugin.NewDataSourceInstance, datasource.ManageOpts{}); err != nil {
14+
if err := datasource.Manage(models.PluginID, plugin.NewDataSourceInstance, datasource.ManageOpts{}); err != nil {
1615
backend.Logger.Error(err.Error())
1716
os.Exit(1)
1817
}

0 commit comments

Comments
 (0)