|
Ran
|
Jobs
1
|
Files
8
|
Run time
1min
|
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
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | ubuntu-latest - py3.11 - 26951477112.1 | 8 |
92.88 |
GitHub Action Run |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
|---|