File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -118,6 +118,14 @@ func jobQueryClause(query *JobQuery) func(db *gorm.DB) *gorm.DB {
118118 refs := strings .Split (query .Release , "," )
119119 db = db .Where ("commit_ref IN(?)" , refs )
120120 }
121+ if query .Sha != "" {
122+ shas := strings .Split (query .Sha , "," )
123+ db = db .Where ("commit_hash IN(?)" , shas )
124+ }
125+ if query .NotSha != "" {
126+ shas := strings .Split (query .NotSha , "," )
127+ db = db .Where ("commit_hash NOT IN(?)" , shas )
128+ }
121129 return db
122130 }
123131}
Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ type JobQuery struct {
99 Status string `form:"status"`
1010 Release string `form:"release"`
1111 Target string `form:"target"`
12+ Sha string `form:"sha"`
13+ NotSha string `form:"not-sha"`
1214}
1315
1416func (q * JobQuery ) Validate () error {
You can’t perform that action at this time.
0 commit comments