Previously, the idea of the "iteration number" for a PR was an increasing sequence of decimal numbers. Now that we had adopted the idea of using the base commit's hash as the "iteration number", we need to be able to list branches that may include hexadecimal values.
I changed one of the unit tests to look for something like pr-name/3f3f3f instead of pr-name/3, and then I played around with the Regex until the tests all passed again. Ultimately, the solution was to use a "character class" consisting of a-f together with \d (digit), and to keep the existing quantifier.
Previously, the idea of the "iteration number" for a PR was an increasing sequence of decimal numbers. Now that we had adopted the idea of using the base commit's hash as the "iteration number", we need to be able to list branches that may include hexadecimal values.
I changed one of the unit tests to look for something like
pr-name/3f3f3f
instead ofpr-name/3
, and then I played around with the Regex until the tests all passed again. Ultimately, the solution was to use a "character class" consisting ofa-f
together with\d
(digit), and to keep the existing quantifier.