Skip to content

tohjustin/aegis

Repository files navigation

About

CircleCI Font Awesome Release License

Aegis is a SVG badge generation service, icons powered by Font Awesome.

Usage

Query Parameters

NOTE: You can use these query parameters to modify any badges generated from badge services below.

Query parameters for configuring your badge appearance.

Query Parameter Description Input Format Example
color Sets the badge primary color RGB Hex Values, CSS Color Keywords "fff", "1BACBF", "mediumturquoise"
icon Sets the badge icon Any one of the available Font Awesome Icons: <STYLE>/<NAME> "brands/github", "regular/star", "solid/star"
status Sets the badge status text Any URL-encoded string "Build%20Status", "ビルド状態"
style Sets the badge style Any one of the 4 available badge styles (classic, flat, plastic, semaphoreci) "classic", "flat", "plastic", "semaphoreci"
subject Sets the badge subject text Any URL-encoded string "Failed", "失敗"

Static Badge Service

Path Description Example
/static?subject=release&status=v2.0.0 Static badge static
/static?subject=style&status=classic&style=classic
/static?subject=style&status=flat&style=flat
/static?subject=style&status=plastic&style=plastic
/static?subject=style&status=semaphoreci&style=semaphoreci
With various badge styles static
static
static
static
/static?subject=license&status=AGPL%20v3&icon=solid/balance-scale With icon static
/static?subject=ビルド状態&status=成功&color=26A876 With non-english characters static

Bitbucket Badge Service

Bitbucket Cloud REST API

Path Description Example
/bitbucket/forks/<USERNAME>/<REPO_SLUG> Fork count bitbucket/forks
/bitbucket/issues/<USERNAME>/<REPO_SLUG>
/bitbucket/issues/<USERNAME>/<REPO_SLUG>?state=new
/bitbucket/issues/<USERNAME>/<REPO_SLUG>?state=open
/bitbucket/issues/<USERNAME>/<REPO_SLUG>?state=resolved
/bitbucket/issues/<USERNAME>/<REPO_SLUG>?state=on-hold
/bitbucket/issues/<USERNAME>/<REPO_SLUG>?state=invalid
/bitbucket/issues/<USERNAME>/<REPO_SLUG>?state=duplicate
/bitbucket/issues/<USERNAME>/<REPO_SLUG>?state=wontfix
/bitbucket/issues/<USERNAME>/<REPO_SLUG>?state=closed
Issue count bitbucket/issues
bitbucket/new-issues
bitbucket/open-issues
bitbucket/resolved-issues
bitbucket/on-hold-issues
bitbucket/invalid-issues
bitbucket/duplicate-issues
bitbucket/wontfix-issues
bitbucket/closed-issues
/bitbucket/pull-requests/<USERNAME>/<REPO_SLUG>
/bitbucket/pull-requests/<USERNAME>/<REPO_SLUG>?state=open
/bitbucket/pull-requests/<USERNAME>/<REPO_SLUG>?state=declined
/bitbucket/pull-requests/<USERNAME>/<REPO_SLUG>?state=merged
/bitbucket/pull-requests/<USERNAME>/<REPO_SLUG>?state=superseded
Pull Request count bitbucket/pull-requests
bitbucket/open-pull-requests
bitbucket/declined-pull-requests
bitbucket/merged-pull-requests
bitbucket/superseded-pull-requests

GitHub Badge Service

GitHub GraphQL API

Path Description Example
/github/forks/<OWNER>/<REPOSITORY> Fork count github/forks
/github/issues/<OWNER>/<REPOSITORY>
/github/issues/<OWNER>/<REPOSITORY>?state=open
/github/issues/<OWNER>/<REPOSITORY>?state=closed
Issue count github/issues
github/open-issues
github/closed-issues
/github/pull-requests/<OWNER>/<REPOSITORY>
/github/pull-requests/<OWNER>/<REPOSITORY>?state=open
/github/pull-requests/<OWNER>/<REPOSITORY>?state=closed
/github/pull-requests/<OWNER>/<REPOSITORY>?state=merged
Pull Request count github/pull-requests
github/open-pull-requests
github/closed-pull-requests
github/merged-pull-requests
/github/stars/<OWNER>/<REPOSITORY> Star count github/stars

GitLab Badge Service

GitLab API

Path Description Example
/gitlab/forks/<NAMESPACE>/<PROJECT_NAME> Fork count gitlab/forks
/gitlab/issues/<NAMESPACE>/<PROJECT_NAME>
/gitlab/issues/<NAMESPACE>/<PROJECT_NAME>?state=opened
/gitlab/issues/<NAMESPACE>/<PROJECT_NAME>?state=closed
Issue count gitlab/issues
gitlab/opened-issues
gitlab/closed-issues
/gitlab/merge-requests/<NAMESPACE>/<PROJECT_NAME>
/gitlab/merge-requests/<NAMESPACE>/<PROJECT_NAME>?state=opened
/gitlab/merge-requests/<NAMESPACE>/<PROJECT_NAME>?state=closed
/gitlab/merge-requests/<NAMESPACE>/<PROJECT_NAME>?state=locked
/gitlab/merge-requests/<NAMESPACE>/<PROJECT_NAME>?state=merged
Merge Request count gitlab/merge-requests
gitlab/opened-merge-requests
gitlab/closed-merge-requests
gitlab/locked-merge-requests
gitlab/merged-merge-requests
/gitlab/stars/<NAMESPACE>/<PROJECT_NAME>
Star count gitlab/stars

Getting Started

This project includes a Makefile for testing and building the project. To see all available options:

❯ make help
all                            Runs a clean, build, fmt, lint, test, staticcheck, vet and install
build                          Builds a dynamic executable or package
bump-version                   Bump the version in the version file. Set BUMP to [ patch | major | minor ]
clean                          Cleanup any build binaries or packages
cover                          Runs go test with coverage
cross                          Builds the cross-compiled binaries, creating a clean directory structure (eg. GOOS/GOARCH/binary)
fmt                            Verifies all files have been `gofmt`ed
install                        Installs the executable or package
lint                           Verifies `golint` passes
release                        Builds the cross-compiled binaries, naming them in such a way for release (eg. binary-GOOS-GOARCH)
static                         Builds a static executable
staticcheck                    Verifies `staticcheck` passes
tag                            Create a new git tag to prepare to build a release
test                           Runs the go tests
vet                            Verifies `go vet` passes

To run the Aegis server locally, make sure to run make all or make build to build the binary & execute it:

❯ ./aegis --github-access-token $GITHUB_ACCESS_TOKEN
{"level":"info","ts":1580194366.3114529,"caller":"service/service.go:71","msg":"Starting Aegis badge generation service...","Version":"1.0.0","GitHash":"7591664-dirty","NumCPU":4}
{"level":"info","ts":1580194366.3115368,"caller":"service/service.go:77","msg":"Initializing services..."}
{"level":"info","ts":1580194366.3117702,"caller":"service/service.go:115","msg":"HTTP server listening...","Port":8080}

License

Aegis is MIT licensed.

FOSSA Status