GithubHelp home page GithubHelp logo

mloskot / github-label-maker Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 2.0 28 KB

Python module to add, remove, edit and dump GitHub labels easily

License: The Unlicense

Python 100.00%
python python-script github github-labels pygithub pygithub-examples

github-label-maker's Introduction

github-label-maker

Python module and script to manage GitHub labels the saner way:

  • create or edit sane labels using labels definitions in JSON files
  • dump your existing precious labels into JSON file

Requirements

Installation

pip install gh-label-maker

Usage

Output of python github-label-maker.py -h should be self-explanatory.

If it is not, there are three modes of operation:

  • clear all labels using --clear
  • add or update labels from files with labels definitions
    • from single file --make-labels-from=/my/scheme/default.json
    • from multiple files --make-labels-from=/my/scheme
  • dump all labels using --dump-labels-to=/my/labels.json

Contribute

# get the source
git clone https://github.com/mloskot/github-label-maker.git

# install source in editable mode 
cd github-label-maker
pip install -e .

# develop and make a pull request!

Credits

  • @GlennWSo contributed fixes, release and package for PIP

github-label-maker's People

Contributors

glennwso avatar mloskot avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

swallat glennwso

github-label-maker's Issues

pip package

My pain is to use i need keep the source code and know the path to it.
currently i do somthing like:

python3 path/to/github_label_maker  ...

Would be nice if this project was packaged.
So it can be installed with pip.
and then used like this:

github_label_maker ...

Does not work for a private repo

steps to reproduce

gh_label_maker -o a-owner -r a-private-repo -d dump.json

Error msg

Traceback (most recent call last):
File "/home/gws/projects/cerinvent-scale/.venv/bin/gh_label_maker", line 8, in
sys.exit(run())
File "/home/gws/projects/cerinvent-scale/.venv/lib/python3.10/site-packages/gh_label_maker/cli.py", line 43, in run
hub = glm.GithubLabelMaker(args.token, args.owner, args.repository, verbose=args.verbose)
File "/home/gws/projects/cerinvent-scale/.venv/lib/python3.10/site-packages/gh_label_maker/glm.py", line 34, in init
self._repo = owner.get_repo(github_repo_name)
File "/home/gws/projects/cerinvent-scale/.venv/lib/python3.10/site-packages/github/AuthenticatedUser.py", line 1069, in get_repo
headers, data = self._requester.requestJsonAndCheck(
File "/home/gws/projects/cerinvent-scale/.venv/lib/python3.10/site-packages/github/Requester.py", line 353, in requestJsonAndCheck
return self.__check(
File "/home/gws/projects/cerinvent-scale/.venv/lib/python3.10/site-packages/github/Requester.py", line 378, in __check
raise self.__createException(status, responseHeaders, output)
github.GithubException.UnknownObjectException: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest/reference/repos#get-a-repository"}

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.