mitibiki / GitHub.vim

Another github v3 api implemented in vim script

Home Page:https://wsdjeg.github.io/GitHub.vim/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GitHub.vim

Another github v3 api implemented in viml

Build Status codecov Gitter Version 0.1.2 Support Vim 7.4 or above MIT License Doc

Intro

This is a viml library to access the Github API v3. With it, you can manage Github resources (repositories, user profiles, organizations, etc.) from viml scripts.

It is WIP, it will covers the full API.

Throughput Graph

If you have any question, any remark, or if you find a bug, or if there is something you can do with the API but not with Github-api.vim, please open an issue.

Install

It is easy to install the lib via dein:

call dein#add('wsdjeg/GitHub.vim')

NOTE: For unauthenticated requests, the rate limit allows for up to 60 requests per hour. Unauthenticated requests are associated with the originating IP address, and not the user making requests.Increasing the unauthenticated rate limit, you need Create OAuth app, and set EVN: CLIENTID and CLIENTSECRET.

Usage

create issue:

function! CreateIssue(owner, repo) abort
    let username = input('your github username:')
    let password = input('your github password:')
    let title = input('Issue title: ')
    let issue = {
                \ 'title': title,
                \ 'body': s:body(),
                \ }
    let response = github#api#issues#Create(a:owner, a:repo,
                \ username, password, issue)
    if !empty(response)
        echomsg 'Create successed! ' . response.url
    else
        echom 'Create failed!'
    endif
endfunction

func! s:body()
    return 'Testting Github.vim...'
endf

About

Another github v3 api implemented in vim script

https://wsdjeg.github.io/GitHub.vim/

License:MIT License


Languages

Language:Vim Script 99.2%Language:Makefile 0.8%