Skip to content

Latest commit

 

History

History
38 lines (23 loc) · 1.61 KB

README.md

File metadata and controls

38 lines (23 loc) · 1.61 KB

Pork the "Project Forking" Tool

This is the project built in the Packt Publishing course called Go: Building DevOps Tools. It is provided here for reference for the course.

Purpose

The purpose of this tool is to help improve your DevOps workflow with GitHub and to teach you some of the basics around creating usable command line tools in Go. It is also used to help you understand working with HTTP requests and responses with REST APIs.

System Requirements

This tool has been tested and works with Go 1.9.2 on macOS 10.13.1 and 10.12.6. It should also work fine on other Linux and Unix systems.

Installation

In order to install the pork binary you should only need to run make.

$ make
$ pork help

Configuration

In order to configure pork you will need to have a pork.yaml file. There is a sample in the code repository for you to use as a reference. The file needs to have 2 fields, location and token. It also needs to be located either in the directory from which you run the tool or it needs to be in the directory pointed to by the HOME environment variable.

Here is an example configuration file:

---
location: /Users/matt
token: mygithubtokenvalue

You will need to obtain a GitHub developer token from your account settings. It should have permissions for public repository access and user read access.

Running Tests

If you attempt to run the tests you will find that they will fail. You will need to edit the test files and update the token variable to use your personal GitHub API token if you want to run the tests. The current values in the test files are invalid.