Improve the branch cutting script 85/91985/16
authorThanh Ha <zxiiro@gmail.com>
Fri, 7 Aug 2020 15:24:41 +0000 (11:24 -0400)
committerThanh Ha <zxiiro@gmail.com>
Wed, 16 Sep 2020 18:11:03 +0000 (14:11 -0400)
commit97b4dbd2fcc9e7018be930e2d2ff64e6564f0a32
tree4c19483e28f3201549acf81943cb646b5d6445c3
parent6cd0444785d81461bbf07ea7cea40118c1932b90
Improve the branch cutting script

This script rewrites the branch cutting script entirely with Python to
use a library that understands YAML. This allows us to smartly parse
the YAML and manipulate the data based on well defined conditions for
supported use cases when updating jobs.

This new script also rely's on pre-commit's prettier hook to format the
YAML files after the script is run in order to maintain consistent and
human readable formatting since Python's YAML libraries strip all
formatting when loading the data stream.

This also adds Python linters to pre-commit as there is Python code
that needs to be managed now.

Issue: RELENG-152
Change-Id: I6360f3a47285197cd9a9be1e95156ea174c919ba
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
scripts/branch_cut/branch_cut.awk [deleted file]
scripts/branch_cut/branch_cutter.sh [deleted file]
scripts/cut-branch-jobs.py [new file with mode: 0755]
tox.ini