GithubHelp home page GithubHelp logo

codecov / browser-extension Goto Github PK

View Code? Open in Web Editor NEW
214.0 214.0 60.0 2.33 MB

Codecov Browser Extension

Home Page: http://codecov.io

License: Apache License 2.0

JavaScript 88.70% CoffeeScript 9.23% CSS 1.73% HTML 0.34%
browser-extension coverage

browser-extension's People

Contributors

stevepeak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

browser-extension's Issues

Not working on Gitlab?

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.

"Coverage Error" in Chrome / OSX

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

"No coverage" reported by extension while viewing PR whenever submitted and reported back just fine

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 PR url

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.

Toggle flags in overlay

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).

Chrome extension: github 'split' files view always shows 100%

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.

Chrome extension not working

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

CodeCov breaking on most recent github

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)

Uncaught ReferenceError: $ is not defined

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.

screen shot 2018-03-20 at 12 37 11 pm

screen shot 2018-03-20 at 12 37 19 pm

Listen to DOM changes

Github will async update the dom with new docs. Need a method to watch these changes and update the DOM with the coverage information.

Option to clear codecov cache?

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.

No coverage displayed for private repos due to 404 error

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:

  • remove and reinstall the extension
  • uninstall google chrome and delete the ~/.cache/google-chrome directory
  • revoke codecov permissions in github
  • revoke access to all sessions in codecov and sign in again.

Chrome: Version 54.0.2840.59 (64-bit)
OS: Ubuntu 16.04

Extension broken in Firefox 50: Needs signing

Thanks for the great plugin!!

I'm sorry to see that things aren't being approved speedily enough on the Mozilla Add-On site.

It's even worse now that Firefox seems to have made the signing of XPI files mandatory.

screenshot from 2016-11-20 09-58-26

Convert to a WebExtension

Overlay in Rollbar

Overlay coverage data in Rollbar

screen shot 2015-05-14 at 10 27 16 am

% 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;

Chrome Extension 1.0.6 not working with CodeCov Enterprise Edition v3.0.7

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"]

Coveralls info under Firefox

Hi, under firefox it seem that coverall coverage infos is added on the list file.
When I move mouse, new values is added...
Under chrome, no problem

capture d ecran 1

Chrome: diff view needs refresh to load the coverage

On the initial switch from a PR to the diff view, the coverage information no longer seems to be loaded.
For example, here are all the requests that happen on the switch:

image

Funnily, after a refresh the coverage information is correctly loaded.

Chrome extension not firing on github page changes, but working if accessed directly?

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.

Add graph

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

support latest firefox browser

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?

Merge commits break coverage

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

Opera plugin doesn't work in Ubuntu 15.10 or 16.04

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.

"Coverage error" in chrome

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.

Green color miss

again under Firefox, toggle button is on, but color not active.
switch button two times (off, on) and that works ...

capture d ecran 3
capture d ecran 4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.