|
Repo Added
|
Build
223
Last
|
Files
8
|
Badge
README BADGES
|
push
github
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>
8 of 8 new or added lines in 1 file covered. (100.0%)
522 of 562 relevant lines covered (92.88%)
0.93 hits per line
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
|---|
![]() |
Badge your Repo: releng-gerrit_to_platformWe detected this repo isn’t badged! Grab the embed code to the right, add it to your repo to show off your code coverage, and when the badge is live hit the refresh button to remove this message.Could not find badge in README. |
|
Embed ▾
README BADGES
|