Code Monkey home page Code Monkey logo

github-repo-size's Introduction

A Firefox addon to display a Github repository's size

Mozilla Add-on

Add repository size to the Github's summary.

Addon screenshot

โš  This addon use the size as returned by the GitHub API and may be innacurate due to how GitHub stores git repositories! See here and here for more informations.

Usage

Download the addon from addons.mozilla.org or, if you prefer, you can download this project as a userscript from the GitHub releases page.

Private Repositories

A Personal Access Token from an account with access to the private repository is required for this addon to work. You can create a Personal Access Token here. Don't forget to check the repo scope.

You can also show the dialog to save your token by clicking on the element added by the addon on any repository, public or private, or you can visit the addon's settings page.

Building

  • Use yarn build to build the Firefox webextension
  • Use yarn watch to have an automated build on changes and yarn webext:run to test the addon

github-repo-size's People

Contributors

dependabot[bot] avatar martii avatar muety avatar shywim avatar yfdyh000 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

Watchers

 avatar  avatar  avatar

github-repo-size's Issues

Use Authorization header instead of deprecated query string

I just got a mail from GitHub, telling me that they have deprecated the access_token query string authentication. A header field should be used instead.

Please use the Authorization HTTP header instead, as using the access_token query parameter is deprecated.

Migrate to using GraphQL API

You may want to migrate to API version v4, which offers a GraphQL interface. Using a GraphQL query, the amount of traffic to be transferred to get the repo size could be reduced dramatically. You would be able to request only the single size field, instead of the whole > 100 lines long JSON document for each repo.

It does not work on private repos

Thank you very much for this gem! I love it!

However, it doesn't work on private repos for me.
The addon has the repo scope and the key is submitted but GitHub still shows the token as Never used. I also generated a new token but it still doesn't work.
I also removed and reinstalled the addon.

Any advice?

Not working for private repositories

I've created an access token with the repos scope, and i have tested it by making a get request to the api with the token and it works fine, the extension doesnt ask for a token when i first visit a private repo and it doesnt show the size even if i manually set the token in the options.

Extension does not properly save access token

Apologies in advance if this is a duplicate. It seems similar to #8, but not quite identical.

It appears as though the extension is not properly saving the personal access token once it is added within the Preferences tab. I've tried uninstalling and re-installing the extension, uninstalling and re-installing Firefox itself, all with no luck. No matter what i do, i can't seem to get the extension to save the access token. And as a result, the extension is unable to work on private repos. I even tried testing this out with a token that had access to every scope possible, still without luck.

I hope this information is helpful, please let me know if there's any additional info i can provide that would help diagnose this.

github_repo_size

I'm using whatever version of firefox comes with the standard download/install as of 2019-12-19, and below is my system information.

image

Doesn't work

Not much else to say. Sonoma 14.3.1, Firefox 123.0.1. No changes in the summary header of a github repo, even this one. i have no other extensions or userscripts enabled affecting github enabled.

Edit: I've noticed a large handful of extensions that affect github that do not work on my firefox instance - however, some extensions on AMO designed to alter Github do work, so I'm not sure what the discrepancy there is.

Userscript fails to install due to wrong icon URL

The userscript version fails to install with the error: 404 - Not Found at https://raw.githubusercontent.com/Shywim/github-repo-size/master/icon/48.png
because of icon update switching 48.png with icon.svg

Cosmetic corrections

screenshot from 2018-01-13 14-18-25

Can you please add some space before and after the numerical value (as for the other bar values),
and also use the binary prefix (KiB instead of KB) for the units? Thanks

Eventually hides

If select branch and go back, then won't show until reload the page. The same if directly click on the repo url from the page user/repo in the left top corner.

Explain the repo size

Perhaps should clarify the size on tooltip and the add-on page, the size is the .git/objects, not the size of current version (the working tree of current branch) or .git + working tree.

Does not work on the new github repo page design.

Title says it all. Github released a new repository page design, which is currently opt-in. On the new design, the plugin doesn't work, i.e. the repo size isn't shown.

image

A temporary fix is to switch back to the old design. However, the old design might be eventually removed.

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.