GithubHelp home page GithubHelp logo

ajitsing / pairing_matrix Goto Github PK

View Code? Open in Web Editor NEW
28.0 4.0 7.0 94 KB

Pairing Matrix For Agile Teams

Home Page: http://www.singhajit.com/pairing-matrix-for-agile-teams/

License: MIT License

Ruby 54.49% HTML 9.06% JavaScript 27.36% CSS 9.09%
agile pair-programming pairing-matrix pairing extreme-programming matrix-visualizer ruby-gem sinatra-applications tool

pairing_matrix's Introduction

PairingMatrix

Maintenance Gem Version HitCount Gem Downloads Open Source Love Twitter Follow

How to read this matrix?

1. This matrix is purely based on commits.
2. Darker the line more the pair has worked together.
3. If you see a dark red circle around a name that means the person has worked alone

Installation

Add this line to your application's Gemfile:

gem 'pairing_matrix'

And then execute:

$ bundle

Or install it yourself as:

$ gem install pairing_matrix

Usage

First of all you need to decide a format for your commit messages e.g. #Feature [Dev1/Dev2] Your commit message

You can choose any format as long as you are able to extract dev names from the message using a regex. Once you have decided on the commit message format, create a pairing_matrix.yml file.

authors_regex: ^.*\[([\w]*)(?:\/)?([\w]*)\].*$

github:
  url: https://api.github.com/
  access_token: 000324cgf89weq56132f32c345hn679c0knh501c
  repositories:
    - org1/repo1
    - org1/repo2
    - github_username/my_private_repo

authors_regex:

This regex is used to extract dev names from the commit message. You can verify your regex in irb console using the below command. If your regex is correct it will return an array of dev names.

e.g

"#4324 [Ajit/Abhishek] My commit message".scan(/^.*\[([\w]*)(?:\/)?([\w]*)\].*$/).flatten
=> ["Ajit", "Abhishek"]

access_token:

If you want to use private repos for matrix, then create a access token and give it the repo read permission. Here is how you can create the token:

Github: https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/

Gitlab: https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html

repositories:

List your repos which you want to use for matrix. If you have your repos inside organization then follow the org/repo format else just mention username/repo.

Now after installing the pairing matrix gem, simply run the pairing_matrix command in the repo where you have pairing_matrix.yml file. This command will start a web server. Then hit the url localhost:4567/matrix or localhost:4567 in the browser. In case you want to use the json data, hit http://localhost:4567/data/:days

Supported code hosting platforms

Pairing matrix gem supports below platforms:

  • Github
  • Gitlab
  • Local

Support for bitbucket is coming soon!

Github sample configuration

authors_regex: ^.*\[([\w]*)(?:\/)?([\w]*)\].*$

github:
  url: https://api.github.com/
  access_token: 000324cff69wes5613f732c345hn679c0knt509c
  repositories:
    - org1/repo1
    - org1/repo2
    - github_username/my_private_repo

Note: Access token is optional if you are using public repositories.

Gitlab sample configuration

authors_regex: ^.*\[([\w]*)(?:\/)?([\w]*)\].*$

gitlab:
  url: https://gitlab.com/api/v4
  access_token: G7EmKQs4swhadZn2sd0T
  repositories:
    - username/repo1
    - username/repo2

Note: Add your custom urls if you are using enterprise version of Github or Gitlab.

For local repositories

authors_regex: ^.*\[([\w]*)(?:\/)?([\w]*)\].*$
local:
  repositories:
    - /Users/Ajit/projects/project1
    - /Users/Ajit/projects/project2
    - /Users/Ajit/projects/project3

Contributing

  1. Fork it ( https://github.com/ajitsing/pairing_matrix/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

License

Copyright (c) 2021 Ajit Singh

MIT License

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

pairing_matrix's People

Contributors

abhikur avatar ajitsing avatar sumanmaity112 avatar sumitgpt 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

Watchers

 avatar  avatar  avatar  avatar

pairing_matrix's Issues

Supporting multiple regex

Ideally, a team shall follow a common template for common authors regex. But there are cases when people follow multiple templates, for ex. [Ajit|Shashank] for few commits and [Ajit/Shashank] for other few commits or maybe something else as well.
Can we supply multiple regex to get better pairing matrix? I am not sure if this is already supported.

Throwing uninitialized constant PairingMatrix::CommitReader (NameError)

I have installed pairing_matrix using gem install pairing_matrix. As per README.md I have pairing_matrix.yml in the current directory. The content of pairing_matrix.yml is given below

authors_regex: ^.*\[([\w]*)(?:\/)?([\w]*)\].*$
repos:
  - /Users/sumanm/pairing

But when I am trying run pairing_matrix, it's throwing following error

/Users/sumanm/.rvm/gems/ruby-2.4.1/gems/pairing_matrix-2.1/lib/pairing_matrix/github_commit_reader.rb:8:in `<module:PairingMatrix>': uninitialized constant PairingMatrix::CommitReader (NameError)
Did you mean?  PairingMatrix::CommitCache
	from /Users/sumanm/.rvm/gems/ruby-2.4.1/gems/pairing_matrix-2.1/lib/pairing_matrix/github_commit_reader.rb:7:in `<top (required)>'
	from /Users/sumanm/.rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /Users/sumanm/.rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /Users/sumanm/.rvm/gems/ruby-2.4.1/gems/pairing_matrix-2.1/lib/pairing_matrix.rb:2:in `glob'
	from /Users/sumanm/.rvm/gems/ruby-2.4.1/gems/pairing_matrix-2.1/lib/pairing_matrix.rb:2:in `<top (required)>'
	from /Users/sumanm/.rvm/gems/ruby-2.4.1/gems/pairing_matrix-2.1/bin/pairing_matrix:2:in `require_relative'
	from /Users/sumanm/.rvm/gems/ruby-2.4.1/gems/pairing_matrix-2.1/bin/pairing_matrix:2:in `<top (required)>'
	from /Users/sumanm/.rvm/gems/ruby-2.4.1/bin/pairing_matrix:23:in `load'
	from /Users/sumanm/.rvm/gems/ruby-2.4.1/bin/pairing_matrix:23:in `<main>'
	from /Users/sumanm/.rvm/gems/ruby-2.4.1/bin/ruby_executable_hooks:15:in `eval'
	from /Users/sumanm/.rvm/gems/ruby-2.4.1/bin/ruby_executable_hooks:15:in `<main>'

Any idea why it's throwing this?

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.