Skip to content

Latest commit

 

History

History
71 lines (48 loc) · 2.3 KB

README.md

File metadata and controls

71 lines (48 loc) · 2.3 KB

washhub - an experimental external Github plugin for Wash

TL;DR

washhub integrates your Github content into your Wash filesystem. You can navigate your organisations, repos, directories and files.

Installation

  1. Of course you already have Wash installed and working on your local system. If not, see Wash Docs for instructions on how to get up and running!

  2. Make sure you have Go installed on your system (tested with go 1.12.5)

  3. Clone the washhub repo and build the plugin. The executable name needs to be github:

    git clone https://github.com/timidri/washhub
    cd washhub
    go build -o github
  4. Configure your github token in ~/.washhub.yaml:

    cat > ~/.washhub.yaml
    github_token: <my_github_token>

    Alternatively, you can use user credentials:

    cat > ~/.washhub.yaml
    github_user: <my_github_user>
    github_password: <my_github_password>
  5. Configure Wash to use the washhub plugin by editing the wash.yaml configuration file (~/.puppetlabs/wash/wash.yaml by default):

    external-plugins:
      - script: '/path/to/washhub/github'
  6. Enjoy!

How to use

Washhub supports the following Wash actions:

  • list: organizations, repos and directories inside repos
  • read: files

Known bugs

Listing orgs with lots of repos can result in an empty repository listing. When running wash in debug mode (wash --loglevel debug) the following error is displayed:

DEBU FUSE: Find .git in /github/<org> errored: script returned a non-zero exit code of 1. stderr output: Error: GET https://api.github.com/orgs/<org>/repos?per_page=99: 502 Server Error []

This erroneous behaviour is documented here and I didn't find a work-around for now. Ideas welcome!

Limitations of washhub

  • Supported are repos, directories and files, other objects such as projects, issues or commits are not supported
  • No metadata support yet
  • stream or exec not supported because Github doesn't support that
  • non-authenticated operation not supported
  • You can hit Github API limits if you use washhub a lot

Author

[email protected]