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
29 changes: 28 additions & 1 deletion api/build/list_org.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,33 @@ import (
// required: true
// type: string
// - in: query
// name: event
// description: Filter by build event
// type: string
// enum:
// - comment
// - deployment
// - pull_request
// - push
// - schedule
// - tag
// - in: query
// name: branch
// description: Filter builds by branch
// type: string
// - in: query
// name: status
// description: Filter by build status
// type: string
// enum:
// - canceled
// - error
// - failure
// - killed
// - pending
// - running
// - success
// - in: query
// name: page
// description: The page of results to retrieve
// type: integer
Expand Down Expand Up @@ -109,7 +136,7 @@ func ListBuildsForOrg(c *gin.Context) {
// verify the event provided is a valid event type
if event != constants.EventComment && event != constants.EventDeploy &&
event != constants.EventPush && event != constants.EventPull &&
event != constants.EventTag {
event != constants.EventTag && event != constants.EventSchedule {
retErr := fmt.Errorf("unable to process event %s: invalid event type provided", event)

util.HandleError(c, http.StatusBadRequest, retErr)
Expand Down
9 changes: 5 additions & 4 deletions api/build/list_repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,12 @@ import (
// description: Filter by build event
// type: string
// enum:
// - push
// - comment
// - deployment
// - pull_request
// - push
// - schedule
// - tag
// - deployment
// - comment
// - in: query
// name: commit
// description: Filter builds based on the commit hash
Expand Down Expand Up @@ -159,7 +160,7 @@ func ListBuildsForRepo(c *gin.Context) {
// verify the event provided is a valid event type
if event != constants.EventComment && event != constants.EventDeploy &&
event != constants.EventPush && event != constants.EventPull &&
event != constants.EventTag {
event != constants.EventTag && event != constants.EventSchedule {
retErr := fmt.Errorf("unable to process event %s: invalid event type provided", event)

util.HandleError(c, http.StatusBadRequest, retErr)
Expand Down