mvisonneau / gitlab-ci-pipelines-exporter

Prometheus / OpenMetrics exporter for GitLab CI pipelines insights
Apache License 2.0
1.26k stars 239 forks source link

fix default branch regexp #665

Closed gnomus closed 1 year ago

gnomus commented 1 year ago

The current regex will match main_foo or foo_master since it resolves to ^main OR master$ and not ^main$ OR ^master$

I added a non-capturing group to the regex to prevent this.

mvisonneau commented 1 year ago

indeed, thanks @gnomus! 🙇

coveralls commented 1 year ago

Coverage Status

coverage: 75.317%. remained the same when pulling fc216238ae03e04c75b011a753efe586dded07d8 on gnomus:main into 718e7303efe84117d1f8bdab1e4690ce05c9777f on mvisonneau:main.