Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/proud-items-compare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'grafana-github-datasource': minor
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's a minor but could it be a patch?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a minor to me, while still crucial.
PS. I'm the one waiting for this to work.

---

Add UpdatedAt time field to pull request queries
4 changes: 3 additions & 1 deletion pkg/models/pull_requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export enum PullRequestTimeField {
ClosedAt,
CreatedAt,
MergedAt,
UpdatedAt,
None,
}

Expand Down
Loading