Skip to content

Instantly share code, notes, and snippets.

View akfaew's full-sized avatar

Michal Mazurek akfaew

View GitHub Profile
@akfaew
akfaew / example.go
Created May 24, 2019 10:01
A working golang example
package main
import (
"context"
"fmt"
"net/http"
geekmail "github.com/geekmail/go-geekmail"
)
@akfaew
akfaew / curl.sh
Last active May 24, 2019 10:04
GeekMail curl.sh Example
TEMPLATE=$(cat <<'END_TEMPLATE' | sed ':a;N;$!ba;s/\n/\\n/g'
To: {{ .To }}
Subject: Hello world!
{{ if .Name }}Hey {{ .Name }},{{ else }}Hey there,{{ end }}
I'm happy that you joined us.
--
Author
$ git clone https://github.com/geekmail/geekmail-cli
Cloning into 'geekmail-cli'...
$ cd geekmail-cli/
$ make build
go build -o geekmail .
$ cat <<END > ~/.geekmail.yaml
githubauth:
repository: "github.com/geekmail/geekmail-sample"
config_path: "config.yaml"
repo_secret: "password123"
merge:
whitelist:
# a PR must have these labels set
labels: ["automerge"]
blacklist:
# a PR may not have these labels set
labels: ["wip"]
# merge method, see https://help.github.com/en/articles/about-merge-methods-on-github
# one of: merge, squash, rebase
method: squash
git clone https://github.com/geekmail/geekmail-cli
cd geekmail-cli
make
mkdir ~/bin
cp geekmail ~/bin
From: {{ .From }}
To: {{ .To }}
Subject: {{ .Subject }}
Hello world!
I'm happy that you joined us on {{ .Date }}.
--
Author
secret: "password123"