Skip to content

Conversation

@twu
Copy link

@twu twu commented Jan 25, 2026

Why?

Resolves #254

Users (and our squad) need to monitor GitHub deployments across different environments (e.g., production, staging) to track which version/hash has been rolled out. Our particular usecase is having Annotation queries to visualize when deployments have hit/made it into production. This is far from perfect but hopefully it's a good enough start.

What?

  • Add deployments query type to support querying GitHub deployments via REST API
  • Create GetAllDeployments function in pkg/github/deployments.go with support for filtering by SHA, ref, task, and environment
  • Add GetDeploymentsInRange function to filter deployments by time range
  • Implement DeploymentsWrapper.Frames() to convert deployments to Grafana DataFrames with fields: id, sha, ref, task, environment, description, creator, created_at, updated_at, url, statuses_url
  • Add ListDeployments method to models.Client interface in pkg/models/client.go
  • Create DeploymentsQuery and ListDeploymentsOptions models in pkg/models/query.go and pkg/models/deployments.go
  • Add QueryEditorDeployments React component in src/views/QueryEditorDeployments.tsx with filter inputs for SHA, ref, task, and environment
  • Integrate deployments query handler in pkg/github/deployments_handler.go and pkg/github/query_handler.go
  • Add deployments query type to datasource handlers in pkg/github/datasource.go, pkg/plugin/datasource.go, and pkg/plugin/datasource_caching.go
  • Add deployments constant to src/constants.ts and update query types in src/types/query.ts
  • Register deployments query editor in src/views/QueryEditor.tsx
  • Add test suite in pkg/github/deployments_test.go covering GetAllDeployments, filtering, time range queries, and DataFrame conversion
  • Update test utilities in pkg/testutil/client.go to support deployments
  • Add documentation for deployments query type in docs/sources/query/_index.md
  • Add patch changeset entry for the new feature

@CLAassistant
Copy link

CLAassistant commented Jan 25, 2026

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@twu twu force-pushed the twu/add-deployment-query-support branch from 83f75dd to f510c8a Compare January 25, 2026 11:05
@twu twu marked this pull request as ready for review January 25, 2026 11:12
@twu twu requested a review from a team as a code owner January 25, 2026 11:12
@twu twu requested review from jcolladokuri and removed request for a team January 25, 2026 11:12
@twu twu enabled auto-merge (squash) January 25, 2026 11:18
@twu twu disabled auto-merge January 25, 2026 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

Feature: Add deployments query type

3 participants