• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

lfit / releng-gerrit_to_platform / 26951485645 / 1
93%
main: 93%

Build:
DEFAULT BRANCH: main
Ran 04 Jun 2026 12:25PM UTC
Files 8
Run time 0s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

13 May 2026 01:38PM UTC coverage: 92.883% (+0.08%) from 92.806%
26951485645.1

push

github

ModeSevenIndustrialSolutions
Fix(helpers): Support Gerrit 3.x compact change-id

Gerrit 3.x and later pass the hook --change argument in a new
compact form: '<URL-encoded project>~<change_number>' (e.g.
'ccsdk%2Fapps~1') rather than the legacy triplet
'project~branch~Iabc123...'.  The previous get_change_id regex
only matched the legacy triplet and crashed with:

    IndexError: list index out of range

on every patchset-created, comment-added and change-merged event
served by a Gerrit 3.x instance, dropping every event before the
workflow dispatch could run.

A diagnostic capture from a CI deployment of Gerrit 3.13.1
showed every hook firing the same traceback at helpers.py:311
with --change='ccsdk%2Fapps~1', confirming the regex mismatch.

Behaviour for the legacy triplet is preserved: when the input
matches '<project>~<branch>~I<hex>', the function still returns
the I... Change-Id from the commit message footer.  When the
input matches the new compact shape '<project>~<digits>', the
function returns it verbatim.  The compact form is still a
unique, stable identifier per change and works as a
GERRIT_CHANGE_ID workflow input (e.g. for concurrency keys),
which is what almost every downstream Gerrit-style workflow
uses it for.

Unrecognised input now raises ValueError with a clear message
instead of IndexError, so future hook tracebacks point at the
mismatch directly rather than at re.findall(...)[0].

Tests cover both shapes plus the rejection path.

Co-authored-by: Claude <claude@anthropic.com>
Change-Id: Ibea897330
Signed-off-by: Matthew Watkins <mwatkins@linuxfoundation.org>

522 of 562 relevant lines covered (92.88%)

0.93 hits per line

Source Files on job ubuntu-latest - py3.11 - 26951485645.1
  • Tree
  • List 8
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 26951485645
  • 64ce7719 on github
  • Prev Job for on main (#25859983988.1)
  • Next Job for on main (#26951501588.1)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc