Coder Social home page Coder Social logo

repo-tools's Introduction

This repo contains a number of tools for working with GitHub repositories:

  • author_check.py: Check that AUTHORS is correct in our repos.
  • pull_age.py: Compute the age of pull requests.
  • wall.py: Run the wall-displayed Pull Request aging chart.
  • sync_labels.py: Sync labels across all GitHub repos to another.

Most of these make GitHub API calls, and so will need GitHub credentials in order to not be severely rate-limited. Edit (or create) ~/.netrc so that it has an entry like this:

machine api.github.com
  login your_user_name
  password ddf9079e12042ac022c101c61c0235965851e209

The login is your GitHub user name, the password is the personal access token you get from https://github.com/settings/applications.

Installation

You'll need to have virtualenv installed already. Then run:

$ git clone https://github.com/edx/repo-tools.git
$ virtualenv venv
$ source venv/bin/activate
$ pip install -r requirements.txt

people.yaml contains the mapping between GitHub username and the canonical entry for AUTHORS files. It also has information about whether the person has signed a contributor agreement or is covered by the institution they work for.

author_check

A commandline utility for checking for consistency between committers, people who have signed a contributor agreement and people in the AUTHORS file.

author_check needs a different authentication mechanism than ~/.netrc. Create an auth.yaml file of the form:

user: "<your github username>"
token: "<your personal access token>"

Various ways to invoke author_check.py:

$ ./author_check.py <owner>/<repo>
audits the given repo

$ ./author_check.py <owner>/<repo> <pull-request-number>
audits the given pull request

$ ./author_check.py <user>
status of given user

$ ./author_check.py
audits all repos in repos.yaml

wall

Generates the JSON used to build the wall-displayed Pull Request age chart.

$ python wall.py > age/age.json
returns a JSON string of aging data

$ python -m SimpleHTTPServer && python -m webbrowser age/age.html
look at the awesome chart

sync_labels

Syncs all github repos in repos.yaml to contain all the labels in labels.yaml

Deletes any labels that exist in a repo but not in labels.yaml

Feedback

Please send any feedback to [email protected].

repo-tools's People

Contributors

nedbat avatar singingwolfboy avatar sarina avatar jtauber avatar filosottile avatar sefk avatar

Watchers

James Cloos avatar JP avatar

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.