codecov / browser-extension Goto Github PK
View Code? Open in Web Editor NEWCodecov Browser Extension
Home Page: http://codecov.io
License: Apache License 2.0
Codecov Browser Extension
Home Page: http://codecov.io
License: Apache License 2.0
Hi
Maybe it can be cool to add a new button in Graphs page in github.
Contributors | Traffic | Commits | Code frequency | Punch card | Network | Members | COVERAGE
used to display the mai coverage graph
Possibly a dupe of #26.
If I go here:
https://github.com/codecov/example-python/tree/master/awesome
And see coverage data on the directory view. Then i click on __init__.py
and i don't see coverage data. So I refresh. Now i see the coverage overlay.
Also if i go direct to:
https://github.com/codecov/example-python/blob/master/awesome/__init__.py
Then I get the coverage overlay.
If i start here:
https://github.com/codecov/example-python/tree/master/
And click into awesome
i don't get an overlay (and if i refresh i do, and as above going there directly gets me an overlay).
I have tried uninstalling and reinstalling the extension - this is the latest version in the chrome store and Version 49.0.2623.110 (64-bit) of chrome.
When there are no reports on the current branch a click on the Codecov button will redirect you to the latest commit on that branch in GitHub.
See https://github.com/fail2ban/fail2ban/pull/1346/files for which codecov report is fail2ban/fail2ban#1346 (comment) (I guess things might change whenever more commits are pushed into PR). For me under both iceweasel (aka firefox, 44.0.2, codecov ext 0.4.6) and chromium (46.0.2490.71, codecov ext 0.5.8) on Debian stretch/sid all files have grayed out "No coverage" button, see e.g. http://www.onerussian.com/tmp/gkrellShoot_03-07-16_124934.png .
Bitbucket changed their PR url from [repo]/pull-request/[id] to [repo]/pull-requests/[id], so the browser extension no longer recognizes when you are on a PR in Bitbucket.
I tried using in firefox quantum, it says it's not compatiable, maybe converting to web extension is a good idea.
Favouring #44
I noticed that the code coverage is only showing up sporadicly on pull requests. I'm not sure why I see it sometimes and why sometimes I don't. I looked in the console and it seems like there's an error in one of the codecov listening scripts though. Googling around makes it sound like it might be problem with jquery not being available.
Was this feature removed? Before when I opened the normal (directory?) view of GitHub files had an overlay with color and a percentage shown.
Firefox 1.0b14 (64-bit)
Extension 1.0.9
Create IE extension.
Create Safari extension.
Chrome throws following parserError when trying to load coverage data while viewing github.com pull request:
SyntaxError: Unexpected token < at Object.parse (native) at n.parseJSON (chrome-extension://keefkhehidemnokodkdkejapdgfjmijf/lib/jquery-2.1.3.min.js:4:5309) at uc (chrome-extension://keefkhehidemnokodkdkejapdgfjmijf/lib/jquery-2.1.3.min.js:4:7333) at x (chrome-extension://keefkhehidemnokodkdkejapdgfjmijf/lib/jquery-2.1.3.min.js:4:10747) at XMLHttpRequest.n.ajaxTransport.k.cors.a.crossDomain.send.b (chrome-extension://keefkhehidemnokodkdkejapdgfjmijf/lib/jquery-2.1.3.min.js:4:14577)
Chrome extension version: 0.4.0
Chrome version: 45.0.2454.93 (64-bit)
Running on OS X 10.9.5
In the Chrome version of the browser extension, go to any PR which reports incomplete coverage on the diff. Then head to the 'Files' tab and select 'Split' view.
You will see that the diff on every file is reporting 100% coverage.
Switch to 'Unified' view.
You will see an accurate report of the coverage for the diff of every file.
In Firefox 57, Mozilla will be dropping legacy add-ons (SDK, XUL and XPCOM), and replacing them with the WebExtensions API.
This API is partially based off of Chrome’s extension API and is multi-process by design.
https://developer.mozilla.org/en-US/Add-ons/WebExtensions
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Porting_a_Google_Chrome_extension
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Porting_a_legacy_Firefox_add-on
https://blog.mozilla.org/addons/2016/11/23/add-ons-in-2017/
https://blog.mozilla.org/addons/2016/09/13/webextensions-and-parity-with-chrome/
https://wiki.mozilla.org/Add-ons/2017
Browser: Chrome
Sometimes if there were a lot of changes to a PR, the codecov browser extension displays code as uncovered when it's covered, or vice versa. Shift-reloading, restarting the browser, removing the extension + restarting browser + re-adding extension etc. does not seem to fix the issue.
When I view the code in codecov itself, the real coverage is displayed. When I switch to a different chrome "person" or use a different browser, the real coverage is displayed. And clearing cached files and cookies from the last hour does seem to fix it.
I'm not sure what causes it to get stuck like this, but perhaps having a "clear cache" button or option to fix it, so I can just delete the codecov data rather than clearing all recent cookies and plugin data (so I have to re-log-in to a bunch of sites), would be awesome.
When I look at this PR (https://github.com/dlang/dmd/pull/6032/files), CodeCov reports "-undefined" as base coverage.
Maybe related to #33?
https://github.com/BlockSync/BlockSync/blob/master/BlockSync/BSBlockSync.m should report 100% coverage, however, since it was via a pull request, it is ajaxing this URL:
https://codecov.io/github/BlockSync/BlockSync?ref=e412148b98fd0f4831737a4a82ffae9fbfcff71e
If you look at the history, e41214 was a merge commit and was not covered: BlockSync/BlockSync@e412148
The proper commit would have been BlockSync/BlockSync@bc83303
So, you may have to "back track" through the commit history to gather coverage data :/ which is odd, because that could cause issues.
tl;dr: latest commit for a file does not mean that was the commit that was covered
Hi, I'm still having big problems seeing coverage in github with the chrome extension.
Coverage displays fine with firefox but with chrome I get "no coverage" and the console shows "Failed to load resource: the server responded with a status of 404 (Not Found)" when loading a link like "https://codecov.io/api/gh/tutorcruncher/TutorCruncher2/compare/c6d2f4e443d442e28e5a94a0c07edcb5685c5af8...f705b74665816f8671e5e9eadc571a9b33646dfc?src=extension". If I go to that link with the browser it loads a bunch of json fine.
This has been going on for I guess around a year. It worked for a bit and has now gone back to not working.
Things I've tried to fix this:
~/.cache/google-chrome
directoryChrome: Version 54.0.2840.59 (64-bit)
OS: Ubuntu 16.04
Hey!
Take a look at this file:
https://github.com/Viskan/landing-pages/blob/master/lib/index.js
It shows all hits (green) but it has 0% coverage.
seems like the extension have now disappeared from their add-ons site.
that's very unfortunate, as Firefox is becoming a sleaker browser with more broad adoption.
how much effort is there to port the addon?
from this PR dlang/phobos#4647
It seems to be an UI error, maybe the overall coverage is only reported from the first file of the diff or there is some rounding involved?
I am using Gitlab, and so far I cannot see any differences with the addon installed on Firefox 45.0 on Linux.
For precisions, I installed the version you recommend: here
Is it a bug, or should I see something?
Thanks.
### Concept 2Show next to entire file coverage
Instead of showing entire file coverage.
Have more concepts? Feel free to comment below!
Github will async update the dom with new docs. Need a method to watch these changes and update the DOM with the coverage information.
Looking at older issues to see if/when anyone mentioned Firefox Quantum support, @stevepeak closed #50 with the comment that this repo isn't likely to be updated. That should be made clear in the readme instead of being obscured through a closed comment.
The Code Cov extension is not displaying coverage information when viewing diffs/files on GitHub.
Chrome Extension Version: 1.0.6
Code Cov Enterprise Edition v3.0.7
Debug Logging:
codecov.js:15 Detecting hostname github.com ["", "github.com", "bitbucket.org"]
2016-08-17 11:13:50.302 codecov.js:23 Hostname passed. Starting Codecov.
2016-08-17 11:13:50.303 codecov.js:78 Github {settings: Object} "::start" undefined
2016-08-17 11:13:50.307 codecov.js:78 Github {settings: Object, slug: "[REDACTED]/[REDACTED]", page: "blob", service: "gh", file: "lib/src/edit/cell_editor_state.dart"…} "::ref" "c945aa57cd5b077f3b45b9a27e9726a1ec643e8f"
2016-08-17 11:13:50.309 codecov.js:78 Github {settings: Object, slug: "[REDACTED]/[REDACTED]", page: "blob", service: "gh", file: "lib/src/edit/cell_editor_state.dart"…} "::prepare" undefined
2016-08-17 11:13:50.322 codecov.js:78 Github {settings: Object, slug: "[REDACTED]/[REDACTED]", page: "blob", service: "gh", file: "lib/src/edit/cell_editor_state.dart"…} "::run" undefined
2016-08-17 11:13:50.345 codecov.js:78 Github {settings: Object, slug: "[REDACTED]/[REDACTED]", page: "blob", service: "gh", file: "lib/src/edit/cell_editor_state.dart"…} "::get" "https://codecov.io"
2016-08-17 11:13:50.460 jquery-2.1.3.min.js:4 GET https://codecov.io/api/gh/[REDACTED]/[REDACTED]/commits/c945aa57cd5b077f3b45b9a27e9726a1ec643e8f?src=extension 404 (Not Found)send @ jquery-2.1.3.min.js:4ajax @ jquery-2.1.3.min.js:4window.Codecov.Codecov._get @ codecov.js:176(anonymous function) @ codecov.js:155(anonymous function) @ codecov.js:3target.(anonymous function) @ extensions::SafeBuiltins:19safeCallbackApply @ extensions::sendRequest:21handleResponse @ extensions::sendRequest:74
2016-08-17 11:13:50.461 codecov.js:78 Github {settings: Object, slug: "[REDACTED]/[REDACTED]", page: "blob", service: "gh", file: "lib/src/edit/cell_editor_state.dart"…} [Object, "error", "Not Found"] undefined
2016-08-17 11:13:50.464 codecov.js:78 Github {settings: Object, slug: "[REDACTED]/[REDACTED]", page: "blob", service: "gh", file: "lib/src/edit/cell_editor_state.dart"…} "::get" "https://codecov.[REDACTED].net"
2016-08-17 11:13:50.467 codecov.js:78 Github {settings: Object, slug: "[REDACTED]/[REDACTED]", page: "blob", service: "gh", file: "lib/src/edit/cell_editor_state.dart"…} "::ajax.complete" [Object, "error"]
2016-08-17 11:13:50.711 codecov.js:78 Github {settings: Object, slug: "[REDACTED]/[REDACTED]", page: "blob", service: "gh", file: "lib/src/edit/cell_editor_state.dart"…} "::process" Object {files: Object, meta: Object, totals: Object}
2016-08-17 11:13:50.714 codecov.js:78 Github {settings: Object, slug: "[REDACTED]/[REDACTED]", page: "blob", service: "gh", file: "lib/src/edit/cell_editor_state.dart"…} "::overlay" undefined
2016-08-17 11:13:50.716 codecov.js:237 TypeError: Cannot read property 'files' of undefined(…)
2016-08-17 11:13:50.718 codecov.js:78 Github {settings: Object, slug: "[REDACTED]/[REDACTED]", page: "blob", service: "gh", file: "lib/src/edit/cell_editor_state.dart"…} TypeError: Cannot read property 'files' of undefined(…) undefined
2016-08-17 11:13:50.720 codecov.js:78 Github {settings: Object, slug: "[REDACTED]/[REDACTED]", page: "blob", service: "gh", file: "lib/src/edit/cell_editor_state.dart"…} "::ajax.complete" [Object, "success"]
If user is blocking 3rd party cookies the extension will not work.
Overlay coverage data in Rollbar
% if style == 'c#':
at ${method or '(unknown method)'}
% if filename:
in ${self.one_filename(filename, lineno, root, github_full_repo, branch, revision, data, frame, project_root)}
% if lineno is not None:
line <span class="lineno">${lineno}</span>
% endif
% endif
% elif style == 'java':
at <span class="filename">${class_name}.${method or '(unknown method)'}</span>
% if filename and lineno:
(${filename}:${lineno})
% else:
(Unknown source)
% endif
% elif style == 'objective-c':
<% library = frame.get('library') %>
% if filename:
${library}
${self.one_filename(filename, lineno, root, github_full_repo, branch, revision, data, frame, project_root)}
line <span class="lineno">${lineno if lineno is not None else '(unknown)'}</span>
in ${method}
% else:
${library}
in ${method}
% endif
%
background: #dfd;
border-left: 3px solid green;
padding-left: 5px;
re @riwnodennyk
Ability to toggle between coverage flags in the extension.
Come up with a non-cumbersome way to change what flag you are viewing (ie. unittests vs integration).
The current content script domain url matching, shows a "scary" permission required message where all data on all sites is exposed to extension.
I'm sure some people would appreciate that the exposed sites will be github/bitbucket as the extension advertises, is there a reason for this change?.
I was viewing https://github.com/sciactive/pnotify/blob/master/src/pnotify.animate.js and kept getting this error in console:
Error in response to storage.get: TypeError: Cannot read property 'split' of undefined
at Github.window.Github.Github.get_ref (chrome-extension://keefkhehidemnokodkdkejapdgfjmijf/lib/codecov.js:370:49)
at Github.window.Codecov.Codecov._start (chrome-extension://keefkhehidemnokodkdkejapdgfjmijf/lib/codecov.js:123:21)
at Github.Codecov (chrome-extension://keefkhehidemnokodkdkejapdgfjmijf/lib/codecov.js:101:10)
at new Github (chrome-extension://keefkhehidemnokodkdkejapdgfjmijf/lib/codecov.js:349:41)
at window.create_codecov_instance (chrome-extension://keefkhehidemnokodkdkejapdgfjmijf/lib/codecov.js:333:12)
at null.callback (chrome-extension://keefkhehidemnokodkdkejapdgfjmijf/lib/codecov.js:27:24)
at HTMLDocument.<anonymous> (chrome-extension://keefkhehidemnokodkdkejapdgfjmijf/lib/codecov.js:9:23)
at j (chrome-extension://keefkhehidemnokodkdkejapdgfjmijf/lib/jquery-2.1.3.min.js:2:26911)
at Object.fireWith [as resolveWith] (chrome-extension://keefkhehidemnokodkdkejapdgfjmijf/lib/jquery-2.1.3.min.js:2:27724)
at Function.ready (chrome-extension://keefkhehidemnokodkdkejapdgfjmijf/lib/jquery-2.1.3.min.js:2:29518)
at I (chrome-extension://keefkhehidemnokodkdkejapdgfjmijf/lib/jquery-2.1.3.min.js:2:29709)
It installs, Opera seems to think it's working, but no coverage shows in Github in any capacity (PRs, repo browsing). Happy to provide any additional info needed to debug.
Opera Version: 37.0.2178.32
Linux Distribution: Ubuntu 16.04 (upgraded from 15.10)
Linux Kernel: 4.4.0-22-generic
Arch: x86_64
Chrome version works fine but Chrome has memory leaks and creates zombie processes on Linux so I can't use it as my day to day browser.
I'm having the following error when using Codecov extension on the PR view:
"Coverage Error"
On console I get:
TypeError: Cannot read property 'c' of undefined
at Github.window.Github.Github.overlay (chrome-extension://keefkhehidemnokodkdkejapdgfjmijf/lib/codecov.js:388:28)
at Github.window.Codecov.Codecov._process (chrome-extension://keefkhehidemnokodkdkejapdgfjmijf/lib/codecov.js:230:19)
at Object.success (chrome-extension://keefkhehidemnokodkdkejapdgfjmijf/lib/codecov.js:184:21)
at j (chrome-extension://keefkhehidemnokodkdkejapdgfjmijf/lib/jquery-2.1.3.min.js:2:26911)
at Object.fireWith [as resolveWith] (chrome-extension://keefkhehidemnokodkdkejapdgfjmijf/lib/jquery-2.1.3.min.js:2:27724)
at x (chrome-extension://keefkhehidemnokodkdkejapdgfjmijf/lib/jquery-2.1.3.min.js:4:11065)
at XMLHttpRequest.<anonymous> (chrome-extension://keefkhehidemnokodkdkejapdgfjmijf/lib/jquery-2.1.3.min.js:4:14577)
Chrome 51.0.2704.63 (64-bit)
Codecov 1.0.4
Chrome Version 50.0.2661.94 (64-bit)
This is for a python project, we are using the latest version of the codecov (2.0.3) package if that matters. It's on a private repo on the PR view.
From the console view:
TypeError: Cannot read property 'ignored' of undefined
at HTMLDivElement.<anonymous> (chrome-extension://keefkhehidemnokodkdkejapdgfjmijf/lib/codecov.js:460:31)
at Function.n.extend.each (chrome-extension://keefkhehidemnokodkdkejapdgfjmijf/lib/jquery-2.1.3.min.js:2:2882)
at n.fn.n.each (chrome-extension://keefkhehidemnokodkdkejapdgfjmijf/lib/jquery-2.1.3.min.js:2:847)
at Github.window.Github.Github.overlay (chrome-extension://keefkhehidemnokodkdkejapdgfjmijf/lib/codecov.js:413:38)
at Github.window.Codecov.Codecov._process (chrome-extension://keefkhehidemnokodkdkejapdgfjmijf/lib/codecov.js:230:19)
at Object.$.ajax.success (chrome-extension://keefkhehidemnokodkdkejapdgfjmijf/lib/codecov.js:184:21)
at j (chrome-extension://keefkhehidemnokodkdkejapdgfjmijf/lib/jquery-2.1.3.min.js:2:26911)
at Object.k.fireWith [as resolveWith] (chrome-extension://keefkhehidemnokodkdkejapdgfjmijf/lib/jquery-2.1.3.min.js:2:27724)
at x (chrome-extension://keefkhehidemnokodkdkejapdgfjmijf/lib/jquery-2.1.3.min.js:4:11065)
at XMLHttpRequest.<anonymous> (chrome-extension://keefkhehidemnokodkdkejapdgfjmijf/lib/jquery-2.1.3.min.js:4:14577)
It seems to be working for non-pr stuff.
Detect Codecov Enterprise endpoints based on dom meta and add the endpoint to extension endpoints.
Latest chrome on Windows 7:
http://i.imgur.com/QsJJO3U.png
It says "Coverage loading..." and never changes. I can see the corresponding codecov page (at https://codecov.io/github/ximinez)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.