Intro to

GitHub Apps + Golang

Kayden Althen

https://slides.com/kaydenalthen/

githubappgolang/

live

Who am I?

DevOps engineer

 

@Magento/Adobe ~1yr

 

ComOps team

 

 sharkySharks

 

Automation nerd

ComOps?

Group of engineers focusing on improving Commerce Engineering

* Release Stabilization

* Release Packaging

* Mainline Queue Manager

* Mainline MTS PR triggering

* Bamboo Administration

* GitHub Administration

* Nightly Test Runs / Pager Duty

* Magento Regression Environments

#comops

Goals

* Share my experiences

 

* Demystify GitHub applications

 

* Break the ice on writing Go apps

Roadmap

* What are GitHub Apps, really?

- configuration vs code

 

* Golang : what and why?

- getting started

 

* Golang GitHub App setup

- show me the code

What are

GitHub Apps,

really?

"GitHub Apps

are the officially recommended way to integrate with GitHub"

- GH docs

In practice,

GitHub apps give you a way to write code around GitHub events.

Events

Respond to practically anything

 

* pull requests

* issues

* comments

* status checks

 

GH API Docs

Why?

 

Automate all the things.

 

 

GH MarketPlace

Configuration

 

and

 

Code

Configuration

* Organization level

* Create a new GitHub App

* Subscribe to events

* Set permissions

* Receive events

 

 

Show me an example

Code

* API

* Receives webhook events

* Validates incoming requests with GH

* Language-agnostic

* Deployed application

* Can start with a proxy (smee.io)

 

 

Golang

What and Why?

What and why?

* statically-typed 

* fast compiled

* native concurrency

* object-oriented

* produces binary executables

* performance close to C

* bash scripts to data science

* system-level to web app

* minimalist design spec (50 pgs)

* standard library has lots

* Google wrote it (2007)

* Docker and K8 are written in go

Also, I just wanted to learn it

Why does go not have X feature?

Every language contains novel features and omits someone's favorite feature. Go was designed with an eye on felicity of programming, speed of compilation, orthogonality of concepts, and the need to support features such as concurrency and garbage collection. Your favorite feature may be missing because it doesn't fit, because it affects compilation speed or clarity of design, or because it would make the fundamental system model too difficult.

- Go designer,  go faqs

Getting Started

File Structure

Build Code

* packages

 

* go get | go build | go install

 

* $GOPATH | $GOBIN

package

imports

vars

funcs

 

Resources

Personal Feels

* GitHub apps are very useful
* Infinite automation possibilities

* Go is accessible; something simple about the syntax

* Learning curve: statically typed, file structure, pointers

Roadmap, revisited

* What are GitHub Apps, really?

- configuration vs code

 

* Golang : what and why?

- getting started

 

* Golang GitHub App setup

- show me the code

Goals, revisited

* Share my experiences

 

* Demystify GitHub applications

 

* Break the ice on writing Go apps

Questions?

GitHub Apps + Go

By Kayden Arias Sharky Althen

GitHub Apps + Go

Intro to GitHub Apps and Golang

  • 1,251