This script will warn and suggest fixes when a CB:<change-id> of an already merged change is found in the commit message. This should enforce the clarification that was added to the documentation in CB:88776. This script requires a JSON parser (i.e. jq) to parse Gerrit's REST API[1]. While it may be possible to grep the values, we chose to use a proper parser to ensure there would be no false-positives. TEST= Prepare a commit with the following commit message: Here are some open changes: CB:88614 CB:88717 CB:87282 Here are some abandoned changes: CB:88413 CB:84504 CB:82136 Here are some merged changes: CB:88566 CB:88598 CB:88697 Here are some old merged commits: CB:1 CB:50 CB:950 Here are some wrong stuff: CL:100 CB:TEST CB:99999 The script produces the following result (may change in the future when open changes are merged etc): Using a change ID (CB:88566) for an already merged commit; please replace it with: commit |
||
|---|---|---|
| .. | ||
| check-style | ||
| check_lint_tests | ||
| checkpatch.pl | ||
| checkpatch_json.py | ||
| const_structs.checkpatch | ||
| coreboot.dict | ||
| description.md | ||
| helper_functions.sh | ||
| kconfig_lint | ||
| kconfig_lint_README | ||
| lint | ||
| lint-000-license-headers | ||
| lint-001-no-global-config-in-romstage | ||
| lint-007-checkpatch | ||
| lint-008-kconfig | ||
| lint-014-qualified-types | ||
| lint-extended-007-checkpatch | ||
| lint-extended-015-final-newlines | ||
| lint-extended-020-signed-off-by | ||
| lint-extended-025-merged-change-ids | ||
| lint-stable-000-license-headers | ||
| lint-stable-003-whitespace | ||
| lint-stable-004-style-labels | ||
| lint-stable-005-board-status | ||
| lint-stable-006-board-name | ||
| lint-stable-008-kconfig | ||
| lint-stable-009-old-licenses | ||
| lint-stable-010-asm-syntax | ||
| lint-stable-012-executable-bit | ||
| lint-stable-013-site-local | ||
| lint-stable-016-non-ascii | ||
| lint-stable-017-configs | ||
| lint-stable-018-symlinks | ||
| lint-stable-019-header-files | ||
| lint-stable-021-coreboot-lowercase | ||
| lint-stable-022-clang-format | ||
| lint-stable-023-filenames | ||
| lint-stable-024-kconfig-no-subsystem | ||
| lint-stable-026-line-endings | ||
| lint-stable-027-maintainers-syntax | ||
| lint-stable-028-touchpad-probed-warning | ||
| lint-stable-029-kconfig-name-selects | ||
| lint-stable-030-makefile-inc | ||
| lint-stable-031-gofmt | ||
| Makefile | ||
| remccoms3.sed | ||
| spelling.txt | ||