From 977831cd0b0f1598a36270d3da70462a2313c24c Mon Sep 17 00:00:00 2001 From: lisongnan Date: Wed, 18 Dec 2024 10:38:09 +0800 Subject: [PATCH] Update get_compliance_dco Signed-off-by: lisongnan --- app/models/tpc_software_graduation_report_metric.rb | 8 ++------ app/models/tpc_software_report_metric.rb | 10 +++------- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/app/models/tpc_software_graduation_report_metric.rb b/app/models/tpc_software_graduation_report_metric.rb index f6a8975..1ff6e7f 100644 --- a/app/models/tpc_software_graduation_report_metric.rb +++ b/app/models/tpc_software_graduation_report_metric.rb @@ -207,16 +207,12 @@ def self.get_compliance_dco(project_url,oh_commit_sha) base = indexer.must(terms: { tag: repo_urls.map { |element| element + ".git" } }) .must(terms: { branches: ["'master'", "'main'"] }) .must(range: { commit_date: { gt: commit_time } }) - .must_not(wildcard: { message: { value: "*Merge pull request*" } }) - .must_not(wildcard: { message: { value: "*Merge branch*" } }) - .must_not(wildcard: { message: { value: "*Merge remote*" } }) + .must_not(wildcard: { message: { value: "*Merge*" } }) .aggregate({ count: { cardinality: { field: "uuid" } } }) .per(0) else base = indexer.must(terms: { tag: repo_urls.map { |element| element + ".git" } }) - .must_not(wildcard: { message: { value: "*Merge pull request*" } }) - .must_not(wildcard: { message: { value: "*Merge branch*" } }) - .must_not(wildcard: { message: { value: "*Merge remote*" } }) + .must_not(wildcard: { message: { value: "*Merge*" } }) .aggregate({ count: { cardinality: { field: "uuid" } } }) .per(0) end diff --git a/app/models/tpc_software_report_metric.rb b/app/models/tpc_software_report_metric.rb index 68b6d84..4f58651 100644 --- a/app/models/tpc_software_report_metric.rb +++ b/app/models/tpc_software_report_metric.rb @@ -444,16 +444,12 @@ def self.get_compliance_dco(project_url,oh_commit_sha) base = indexer.must(terms: { tag: repo_urls.map { |element| element + ".git" } }) .must(terms: { branches: ["'master'", "'main'"] }) .must(range: { commit_date: { gt: commit_time } }) - .must_not(wildcard: { message: { value: "*Merge pull request*" } }) - .must_not(wildcard: { message: { value: "*Merge branch*" } }) - .must_not(wildcard: { message: { value: "*Merge remote*" } }) - .aggregate({ count: { cardinality: { field: "uuid" } }}) + .must_not(wildcard: { message: { value: "*Merge*" } }) + .aggregate({ count: { cardinality: { field: "uuid" } } }) .per(0) else base = indexer.must(terms: { tag: repo_urls.map { |element| element + ".git" } }) - .must_not(wildcard: { message: { value: "*Merge pull request*" } }) - .must_not(wildcard: { message: { value: "*Merge branch*" } }) - .must_not(wildcard: { message: { value: "*Merge remote*" } }) + .must_not(wildcard: { message: { value: "*Merge*" } }) .aggregate({ count: { cardinality: { field: "uuid" } } }) .per(0)