Git Product home page Git Product logo

gh-actuse's Introduction

Hi ๐Ÿ‘‹

I'm Geoffrey Wiseman.

I do software consulting directly as Codiform.

I also work with project teams through organizations like:

I contribute to open-source projects and run some of my own.

I'm:

  • A member of software communities like Stack Overflow.
  • A Canadian ๐Ÿ‡จ๐Ÿ‡ฆ
  • A Father ๐Ÿ‘ช

gh-actuse's People

Contributors

geoffreywiseman avatar lucasew 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

Watchers

 avatar  avatar  avatar

gh-actuse's Issues

Tabular Output

The current output format is fine for reading, but if you'd like to manipulate the data in any way, would be nice to be able to get something closer to a tabular format -- maybe even CSV. Of course, you can already get CSV direct from GitHub, but this'd be another way of getting it, I suppose.

Filter Repositories with No Workflows

Right now, if you dump a whole organization, and that organization has Actions enabled for all repos but many of those repositories don't have actions, it'll be harder to see the usage of the repos that do have actions. Would be nice to be able to request that repositories without workflows don't appear in the output if that's what you want.

Add support for secure token storage

Token storage change in latest release of gh

This is a message from the GitHub CLI team, maintainers of gh, writing to inform you that the most recent release of gh contains changes which may affect your extension. The latest release introduces the feature of storing authentication tokens in the system keyring (encrypted storage) instead of in a plain text file.
The keyrings that are supported are:

  • Keychain on macOS

  • GNOME Keyring on Linux (Secret Service dbus interface)

  • Wincred on Windows

This has huge security benefits for the users of our tool and was one of our oldest outstanding issues. Unfortunately this change has the potential to break extensions that rely on utilizing the users authentication token to work.

In order to have continued compatibility with gh there are some actions you, as an extension author, need to take. These actions will depend on the implementation of your extension.

Extensions built in Go using go-gh:

  1. Upgrade your go-gh version to v1.2.1, the latest version.

  2. Verify that in your extension retrieval of the user authentication token is done using the auth.TokenForHost function.

    • If you were previously accessing the authentication token using any other method it will no longer work.
    • Automatic resolution of the authentication token when using the API clients will continue to work without changes.

All other extensions:

  1. Verify that in your extension retrieval of the user authentication token is done by shelling out to the gh auth token command.

    • If you were previously accessing the authentication token using the gh config get command, reading the configuration file directly, or any other methods it will no longer work.

As of right now storing the authentication token in the system keyring is an opt-in feature, but in the near future it will be required and at that point if the changes above are not made then your extension will be broken for all users. If you have any questions/concerns about this change please feel free to open a discussion in the gh repo.

Thanks,
The GitHub CLI Team

Orgs with >100 Repos

Right now I just ask for the most repos I can get in a single call, 100, and stop there. If you're looking at an organization with more repositories, some will be missing.

Binary Extension

The Golang gh-extension work I've already seen on a few extensions looks to be part of a soon-to-be-released support for binary extensions that will be documented and usable. And since working with the extension in bash is pretty painful, I'm hoping this will make it easier to write a higher-quality, faster extension.

It'll also be a bunch of work. ;)

Organization Support

Would be nice to be able to see the usage of every repository in an organization (or the ones enabled for GH Actions, if not all); and the rollup total.

For large organizations this might be pretty slow currently.

Catch 502

Got this error for one of my org's repos:

GitHub Actions Usage

Repo _org/name_:
- Workflow 'x' Usage: 5h (334m)
- Workflow 'xx' Usage: 31m
- Workflow 'xxx' Usage: 0ms
gh: Server Error (HTTP 502)
/path/to/gh/extensions/gh-actuse/gh-actuse: line 93: {: syntax error: operand expected (error token is "{")

Thanks for writing this extension!! I'll contribute back anything else I find.

Org Billing Cycle and Predictive Overage

GitHub doesn't expose much information about the billing cycle in the API -- either the REST or the GraphQL, near as I can see.

The only thing I've found so far is a number of days left in the billing cycle in the storage resource.

This extension could in theory use this to roughly calculate what percentage of the cycle is done and how many minutes of actions usage there have been and if the actions usage is likely to go into billed minutes, and if so, roughly how many, and roughly what cost.

It can't be super accurate without better knowledge of the billing cycle, but it could be loosely useful.

Adopt Billing Usage API

GitHub has an item on their roadmap for a more advanced Billing Usage API (although the description is lacking real detail). The current timeline is "future", which doesn't suggest that this will be available anytime soon.

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.