diff --git a/.changeset/proud-items-compare.md b/.changeset/proud-items-compare.md new file mode 100644 index 00000000..8b234651 --- /dev/null +++ b/.changeset/proud-items-compare.md @@ -0,0 +1,5 @@ +--- +'grafana-github-datasource': minor +--- + +Add UpdatedAt time field to pull request queries diff --git a/pkg/models/pull_requests.go b/pkg/models/pull_requests.go index c0e8e097..33001f89 100644 --- a/pkg/models/pull_requests.go +++ b/pkg/models/pull_requests.go @@ -10,12 +10,14 @@ const ( PullRequestCreatedAt // PullRequestMergedAt is used when filtering when a Pull Request was merged PullRequestMergedAt + // PullRequestUpdatedAt is used when filtering when a Pull Request was updated + PullRequestUpdatedAt // PullRequestNone is used when the results are not filtered by time. Without any other filters, using this could easily cause an access token to be rate limited PullRequestNone ) func (d PullRequestTimeField) String() string { - return [...]string{"closed", "created", "merged"}[d] + return [...]string{"closed", "created", "merged", "updated"}[d] } // ListPullRequestsOptions are the available options when listing pull requests in a time range diff --git a/src/constants.ts b/src/constants.ts index a141e8cc..bbd2d559 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -38,6 +38,7 @@ export enum PullRequestTimeField { ClosedAt, CreatedAt, MergedAt, + UpdatedAt, None, }