Giter VIP home page Giter VIP logo

githubot's Introduction

githubot

Build Status license

Command line tool to use Github's API for automation:

  • create release with assets
  • upload/download files to github
  • TODO

Installation

pip install githubot

Usage

Create release with assets

Releases management.

Usage: githubot release --token=TOKEN --repo=REPO
                        [--tag=TAG] [--title=TITLE] [--message=MESSAGE]
                        [ASSETS...]

Options:
    --token=TOKEN           Github access token.
    -r=REPO --repo=REPO     Repo full name like: owner/repo.
    --tag=TAG               Tag name for the release. If the tag does not
                            exist it will be created on default branch.
    --title=TITLE           Title for the release.
    --message=MESSAGE       Message for the release.
    -h --help               Show this message and exit.

For example:

Create a release to repo WqyJh/test with assets under the path of assets/.

githubot release --token <github_token> --repo WqyJh/test assets/*

Create a release and specify tag, title and message for it.

githubot release \
--token <github_token> \
--repo WqyJh/test \
--tag test_tag \
--title "This is an test title" \
--message "This release contains xxx" \
assets/*

Only regular files are supported for the --assets option, directories are not supported. You can specify files in the following manner:

--assets file1 file2
--assets path/* # wildcard

Use github repo as cloud storage

Files management.

Usage: githubot file upload --token=TOKEN --repo=REPO  [FILES...]
       githubot file download --token=TOKEN --repo=REPO  [FILES...]

Options:
    --token=TOKEN           Github access token.
    -r=REPO --repo=REPO     Repo full name like: owner/repo.
    -h --help               Show this message and exit.

Upload files

Upload files to github repo WqyJh/test.

./run.py file upload \
--token <github_token> \
--repo WqyJh/test \
file1 file2 file*

Note that the FILES argument is just the same with ASSETS, only regular files are supported.

Download files

Download files from github repo WqyJh/test.

./run.py file download \
--token <github_token> \
--repo WqyJh/test \
file1 dir1 dir2/

Note that the FILES argument here cannot contains wildcard, but it can contains directories.

Delete files

Delete files from github repo.

./run.py file delete \
--token <github_token> \
--repo Wqyjh/test \
file1 dir1 dir2/

Development

  • bumping 0.3.0 (PYPI)
  • auto-changelog 1.15.0 (NPM)

The release processing is as follow:

  1. Calculate semantic version
    git checkout dev
    git pull origin dev
    bumping
  2. Create release branch from dev
    git checkout -b release-<version>
  3. Modify the version and commit
  4. Generate changelog and commit
    auto-changelog --latest-version <version> --tag-prefix v
  5. Merge to master branch
  6. Tag version to master branch

githubot's People

Contributors

wqyjh avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

githubot's Issues

Delete files

githubot file delete file1 file2
githubot file delete dir1

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.