merge-kernel: LTS workflow requires a different way to match CL's

Due to LTS+CTS special requirements and temporary infra limitations,
we need to stage kernels with only CQ+1 testing without submitting them.
To prevent CL proliferation when abandoning each upload after CQ+1,
we can reuse the previous non-submitted CL for the next update.

The merge-kernel script needs a different way to look up existing
open merge CLs to re-use in this case. Currently the CL search
algorithm matches on a hashtag which is unique to the patch update and
with continuous updates that won't work. Then it matches on subject
line, and that too also changes for each release. Instead, this change
finds a match if there is a single open CL on the same branch, that
has several merge kernel keywords. It's not ideal, but the traffic on
each LTS branch is so limited that collisions or issues appear unlikely.

BUG=b:224998384
TEST=Several manual merge-kernel LTS kernel update uploads.

Change-Id: If906b976169f574817feca2aae4da64960e6e922
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/dev-util/+/3531163
Reviewed-by: William K Lin <wklin@google.com>
Auto-Submit: Martin Faltesek <mfaltesek@google.com>
Reviewed-by: Martin Faltesek <mfaltesek@google.com>
Commit-Queue: Martin Faltesek <mfaltesek@google.com>
Tested-by: Martin Faltesek <mfaltesek@google.com>
1 file changed