codecov / codecov-browser-extension

A browser extension for Codecov. Works for Chrome and Firefox
Apache License 2.0
37 stars 12 forks source link

Commit ref parsing is buggy #40

Closed anukul closed 1 year ago

anukul commented 1 year ago

The commit ref for which to fetch the coverage report is currently parsed from the URL using a regex.

This approach breaks for tags (or branches with / in name) because we can't tell where the ref ends.

anukul commented 1 year ago

Looks like the fix for this involves hacking the ref from the DOM

image
document.querySelector('[data-hotkey="w"]').ariaLabel.split(' ')[0]