Ghub provides basic support for using the APIs of various Git forges from Emacs packages. Originally it only supported the Github REST API, but now it also supports the Github GraphQL API as well as the REST APIs of Gitlab, Gitea, Gogs and Bitbucket.
Ghub abstracts access to API resources using only a handful of basic functions such as ‘ghub-get‘. These are convenience wrappers around ‘ghub-request‘. Additional forge-specific wrappers like ‘glab-put‘, ‘gtea-put‘, ‘gogs-post‘ and ‘buck-delete‘ are also available. Ghub does not provide any resource-specific functions, with the exception of ‘FORGE-repository-id‘.
When accessing Github, then Ghub handles the creation and storage of access tokens using a setup wizard to make it easier for users to get started. The tokens for other forges have to be created manually.
Ghub is intentionally limited to only provide these two essential features — basic request functions and guided setup — to avoid being too opinionated, which would hinder wide adoption. It is assumed that wide adoption would make life easier for users and maintainers alike, because then all packages that talk to forge APIs could be configured the same way.
This manual is for Ghub version 3.2.0 (v3.2.0-45-ge19cd86+1).
Copyright (C) 2017-2019 Jonas Bernoulli <firstname.lastname@example.org>
You can redistribute this document and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This document is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|• Getting Started:|
|• Using Ghub in Personal Scripts:|
|• Using Ghub in a Package:|
|• GraphQL Support:|
|• Support for Other Forges:|
— The Detailed Node Listing — Getting Started
|• Setting the Username:|
|• Interactively Creating and Storing a Token:|
|• Manually Creating and Storing a Token:|
|• How Ghub uses Auth-Source:|
|• Making Requests:|
|• Configuration Variables:|
Support for Other Forges
|• Forge Functions and Variables:|
|• Forge Limitations and Notes:|