aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugin_bots/cherrypick_status_db/cherrypick_status_db.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugin_bots/cherrypick_status_db/cherrypick_status_db.js b/plugin_bots/cherrypick_status_db/cherrypick_status_db.js
index 1eda3b5..b438547 100644
--- a/plugin_bots/cherrypick_status_db/cherrypick_status_db.js
+++ b/plugin_bots/cherrypick_status_db/cherrypick_status_db.js
@@ -99,7 +99,7 @@ class cherrypick_status_db {
}
// Extract parameters, defaulting boolean flags to false if undefined
- let { repos, owner, page, branches: branchesParam, hashtags: hashtagsParam, onlyStuck = false, exclAbandon = false, onlyExternalTqtc = false, changeId } = req.body;
+ let { repos, owner, page, branches: branchesParam, hashtags: hashtagsParam, onlyStuck = false, exclAbandon = false, onlyExternalTqtc = false, changeId, subject } = req.body;
let branchesArray = [];
let hashtagsArray = [];
@@ -187,6 +187,11 @@ class cherrypick_status_db {
queryParams.push(owner);
}
+ if (subject && typeof subject === 'string' && subject.trim()) {
+ whereClauses.push(`subject ILIKE ('%' || $${queryParams.length + 1} || '%')`);
+ queryParams.push(subject.trim());
+ }
+
// Add filter for hashtags if provided
if (hashtagsArray.length > 0) {
whereClauses.push(`