Giter Club home page Giter Club logo

github-agile-dashboard's Introduction

📉 Github Agile Dashboard

Installation

npm install -g @elao/github-agile-dashboard

Configuration

GitHub authentication

As recommended by GitHub, Gad relies on github.user and github.token variables in your git config to authenticate you on GitHub API. Follow these three steps and you're good to go:

  1. Set up your GitHub username in your git config:

    git config --global github.user "Tom32i"

  2. Generate a GitHub personal access token with the following access rights: repo and user.

  3. Set up your GitHub token in your git config:

    git config --global github.token MyGitHubPersonalAccessToken

Usage

Configure your agile project on GitHub

  1. Create a milestone "Backlog" (or whatever name) with no due date : it will be your backlog.
  2. Create a milestone per Sprint with a due date.
  3. Create two labels "Ready to review" and "In Progress".
  4. Create issues in milestone "Backlog".
  5. Add an estimation [x] in the issue title, for example: "Add a user login [3]".
  6. Create Pull Request in sprint milestone with tag "Ready to review" or "In Progress".

Commands

In your projet repository, just enter gad [command] (options).

Command Description Options
sprint Show the state of the current sprint sprint -s=-1 Show the previous sprint
sprints Show the state of all sprints limit -l=2 limit the number of sprint to display
backlog Show the state of the backlog
review Display PullRequest that are awaiting your review
changelog Generate a markdown changelog of the current sprint all --all include open issues in the changelog. sprint -s=-2 Show the changelog from two sprints ago
estimate Show stories that are missing estimation
sum Calculate the sum of the stories matching the given filters label --label=API include issues with label "API"
status Show the status of the repository
help Show list of commands
exit Quit the dashboard

Options

You can manually specify any of the options on the fly:

gad -o [organisation|owner] -r [repo] -u [username] -p [password|token]

E.g.: gad -o Elao -r symfony-standard -u Tom32i -p MyGitHubPersonalAccessToken

Cache

For performance purpose, Gad keeps a little cache file for each repository.

By default, it's located in ~/.gad/cache but you can specify a different path with the cacheDir option:

gad -c ./cache

Contributing

Installation

git clone [email protected]:Elao/github-agile-dashboard.git
cd github-agile-dashboard
npm install

Usage

node gad.js -o [organisation|owner] -r [repo] -u [username] -p [password|token]

Coding style

npm run lint

Publishing on NPM

npm publish --access public

github-agile-dashboard's People

Contributors

chalasr avatar ogizanagi avatar supertanuki avatar tom32i avatar

Stargazers

 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

github-agile-dashboard's Issues

Feature request: Pull requests points support in title

Currently, only issues are supported.

As on a recent project we want to edit specs committed in the repository in the very same PR as the one introducing code changes, we'll set the points on the PR title, not on issues.
Hence this feature request 😄

Validate parameters

Based on @chalasr 's observations :

Just played a bit with this, the following runs fine:
gad -o [org] -r [repo] [command] --[command-options]
but the following doesn't:
gad [command] -o [org] -r [repo] --[command-options]
it leads to:

⏳ Fetching issues...
{ [Error: Empty value for parameter 'owner': null]
defaultMessage: 'Bad Request',
message: 'Empty value for parameter 'owner': null',
code: '400',
status: 'Bad Request',
headers: undefined }

Firstly, I think we should add some validation rules to the options and validate them before performing any http request or writing > anything to the output, in order to provide meaningful error messages when an option is missing or has an invalid value.
The first thing I would validate, now that you removed the interactive mode, is that a valid command has been passed.
Actually running just gad within this PR leads to the very same error (Bad Request, null owner). I would love to get an "help" > displayed in this case (list of all commands with options, same as the README table)
Running gad foobar leads to the same. I would love to get something like Invalid command "foobar". [help] in this case. WDYT?

Secondly, is it expected that global options (e.g. --owner, --repo) must be passed before the command name and options?
I think it would be nice if my 2nd (failing) try had worked as the first one. Is it doable?
That means kind of merging global options with command ones so that neither their order nor their position matters, which makes > sense I think.

Cache directory issue

⏳  Fetching issues...
fs.js:894
  return binding.mkdir(pathModule._makeLong(path),
                 ^

Error: EACCES: permission denied, mkdir '//usr/local/lib/node_modules/@elao/github-agile-dashboard/cache'
    at Object.fs.mkdirSync (fs.js:894:18)
    at fullPath.split.reduce (/usr/local/lib/node_modules/@elao/github-agile-dashboard/src/Loader/Cache.js:74:20)
    at Array.reduce (native)
    at Cache.ensureDirectoryExists (/usr/local/lib/node_modules/@elao/github-agile-dashboard/src/Loader/Cache.js:70:29)
    at Cache.load (/usr/local/lib/node_modules/@elao/github-agile-dashboard/src/Loader/Cache.js:38:14)
    at HttpLoader.load (/usr/local/lib/node_modules/@elao/github-agile-dashboard/src/Loader/HttpLoader.js:49:32)
    at new GithubAgileDashboard (/usr/local/lib/node_modules/@elao/github-agile-dashboard/src/GithubAgileDashboard.js:28:21)
    at Object.<anonymous> (/usr/local/lib/node_modules/@elao/github-agile-dashboard/gad.js:31:1)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)

Le problème est que à ma connaissance /usr/local/lib/ n'est habituellement pas accessible en écriture par l'utilisateur, hors super user.

Plusieurs propositions d'emplacement de cache:

  • le dossier utilisateur, avec un .gad/cache ? Pour récupérer le dossier utilisateur, utiliser la variable d'env HOME qui est généralement set un peu partout, y compris sous windows il me semble (ou simplement via https://nodejs.org/api/os.html#os_os_homedir).
  • le "local app data" dans le dossier utilisateur:
    • Sous windows: C:\Users\<username>\AppData\Local
    • Sous OS X: ~/Library/Caches
    • ...
      Mais il ne semble pas y avoir de solution générique pour l'obtenir, à part différentes variables d'env selon l'OS.
  • simplement dans /tmp (removed à chaque reboot) ? https://nodejs.org/api/os.html#os_os_tmpdir

some refs:

Load Github token from git config

It seems better to avoid loading the Github Token from an environment variable.
Something like this seems preferable:

composer config -g github-oauth.github.com <oauthtoken>

Thanks @chalasr for the suggestion.

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.