Only extract issue references for issue metrics when there are references
Currently on every commit we try to extract any mentioned issues and use these to update issue metrics. In many cases it can be possible for a commit to not contain any mentions, yet we still trigger the reference parsing pipeline.
A potential simple workaround is to use Issue.reference_pattern
to check if the commit message refers to any issues. If this is the case we start the pipeline. Since this pattern may not cover issue URLs it should probably be something like:
- If the commit message matches
Issue.reference_pattern
, trigger the pipeline OR - If the commit message matches
/https?:\/\/.+\/issues\/\d+
or something like that, trigger the pipeline
Either way, the point is to not trigger the pipeline whenever we're certain it's not going to return any useful data anyway.