Add is_archived option for issue indexer (#32735)

Try to fix #32697

Reason:
`is_archived` is already defined in the query options, but it is not
implemented in the indexer.
This commit is contained in:
yp05327 2024-12-12 08:33:31 +09:00 committed by GitHub
parent 39a01016cd
commit d43620e7bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 62 additions and 11 deletions

View file

@ -25,6 +25,7 @@ type IndexerData struct {
// Fields used for filtering
IsPull bool `json:"is_pull"`
IsClosed bool `json:"is_closed"`
IsArchived bool `json:"is_archived"`
LabelIDs []int64 `json:"label_ids"`
NoLabel bool `json:"no_label"` // True if LabelIDs is empty
MilestoneID int64 `json:"milestone_id"`
@ -81,8 +82,9 @@ type SearchOptions struct {
RepoIDs []int64 // repository IDs which the issues belong to
AllPublic bool // if include all public repositories
IsPull optional.Option[bool] // if the issues is a pull request
IsClosed optional.Option[bool] // if the issues is closed
IsPull optional.Option[bool] // if the issues is a pull request
IsClosed optional.Option[bool] // if the issues is closed
IsArchived optional.Option[bool] // if the repo is archived
IncludedLabelIDs []int64 // labels the issues have
ExcludedLabelIDs []int64 // labels the issues don't have