https://github.com/tohjustin/aegis
Badge generation service
https://github.com/tohjustin/aegis
badge badge-generator github metadata status svg
Last synced: 10 months ago
JSON representation
Badge generation service
- Host: GitHub
- URL: https://github.com/tohjustin/aegis
- Owner: tohjustin
- License: mit
- Created: 2018-04-27T21:32:33.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2025-07-18T17:38:36.000Z (11 months ago)
- Last Synced: 2025-08-15T03:54:17.635Z (10 months ago)
- Topics: badge, badge-generator, github, metadata, status, svg
- Language: Go
- Homepage: https://aegisbadges.appspot.com
- Size: 3.37 MB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## About
[](https://circleci.com/gh/tohjustin/aegis/tree/master)
[](https://fontawesome.com/)
[](https://github.com/tohjustin/aegis/releases)
[](https://opensource.org/licenses/MIT)
Aegis is a SVG badge generation service, icons powered by [Font Awesome](https://fontawesome.com/https://fontawesome.com/).
## 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](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value) | "fff", "1BACBF", "mediumturquoise" |
| icon | Sets the badge icon | Any one of the available [Font Awesome Icons](https://fontawesome.com/icons): `/<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](https://aegisbadges.appspot.com/static?subject=release&status=v2.0.0) | Static badge |  |
| [/static?subject=style&status=classic&style=classic](https://aegisbadges.appspot.com/static?subject=style&status=classic&style=classic)<br>[/static?subject=style&status=flat&style=flat](https://aegisbadges.appspot.com/static?subject=style&status=flat&style=flat)<br>[/static?subject=style&status=plastic&style=plastic](https://aegisbadges.appspot.com/static?subject=style&status=plastic&style=plastic)<br>[/static?subject=style&status=semaphoreci&style=semaphoreci](https://aegisbadges.appspot.com/static?subject=style&status=semaphoreci&style=semaphoreci) | With various badge styles | <br><br><br> |
| [/static?subject=license&status=AGPL%20v3&icon=solid/balance-scale](https://aegisbadges.appspot.com/static?subject=license&status=AGPL%20v3&icon=solid/balance-scale) | With icon |  |
| [/static?subject=ビルド状態&status=成功&color=26A876](https://aegisbadges.appspot.com/static?subject=ビルド状態&status=成功&color=26A876) | With non-english characters |  |
### Bitbucket Badge Service
[](https://developer.atlassian.com/bitbucket/api/2/reference/)
| Path | Description | Example |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| /bitbucket/forks/`<USERNAME>`/`<REPO_SLUG>` | Fork count |  |
| /bitbucket/issues/`<USERNAME>`/`<REPO_SLUG>`<br>/bitbucket/issues/`<USERNAME>`/`<REPO_SLUG>`?state=new<br>/bitbucket/issues/`<USERNAME>`/`<REPO_SLUG>`?state=open<br>/bitbucket/issues/`<USERNAME>`/`<REPO_SLUG>`?state=resolved<br>/bitbucket/issues/`<USERNAME>`/`<REPO_SLUG>`?state=on-hold<br>/bitbucket/issues/`<USERNAME>`/`<REPO_SLUG>`?state=invalid<br>/bitbucket/issues/`<USERNAME>`/`<REPO_SLUG>`?state=duplicate<br>/bitbucket/issues/`<USERNAME>`/`<REPO_SLUG>`?state=wontfix<br>/bitbucket/issues/`<USERNAME>`/`<REPO_SLUG>`?state=closed<br> | Issue count | <br><br><br><br><br><br><br><br><br> |
| /bitbucket/pull-requests/`<USERNAME>`/`<REPO_SLUG>`<br>/bitbucket/pull-requests/`<USERNAME>`/`<REPO_SLUG>`?state=open<br>/bitbucket/pull-requests/`<USERNAME>`/`<REPO_SLUG>`?state=declined<br>/bitbucket/pull-requests/`<USERNAME>`/`<REPO_SLUG>`?state=merged<br>/bitbucket/pull-requests/`<USERNAME>`/`<REPO_SLUG>`?state=superseded<br> | Pull Request count | <br><br><br><br> |
### GitHub Badge Service
[](https://developer.github.com/v4/)
| Path | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| /github/forks/`<OWNER>`/`<REPOSITORY>` | Fork count |  |
| /github/issues/`<OWNER>`/`<REPOSITORY>`<br>/github/issues/`<OWNER>`/`<REPOSITORY>`?state=open<br>/github/issues/`<OWNER>`/`<REPOSITORY>`?state=closed<br> | Issue count | <br><br> |
| /github/pull-requests/`<OWNER>`/`<REPOSITORY>`<br>/github/pull-requests/`<OWNER>`/`<REPOSITORY>`?state=open<br>/github/pull-requests/`<OWNER>`/`<REPOSITORY>`?state=closed<br>/github/pull-requests/`<OWNER>`/`<REPOSITORY>`?state=merged<br> | Pull Request count | <br><br><br> |
| /github/stars/`<OWNER>`/`<REPOSITORY>` | Star count |  |
### GitLab Badge Service
[](https://docs.gitlab.com/ee/api/)
| Path | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| /gitlab/forks/`<NAMESPACE>`/`<PROJECT_NAME>` | Fork count |  |
| /gitlab/issues/`<NAMESPACE>`/`<PROJECT_NAME>`<br>/gitlab/issues/`<NAMESPACE>`/`<PROJECT_NAME>`?state=opened<br>/gitlab/issues/`<NAMESPACE>`/`<PROJECT_NAME>`?state=closed<br> | Issue count | <br><br><br> |
| /gitlab/merge-requests/`<NAMESPACE>`/`<PROJECT_NAME>`<br>/gitlab/merge-requests/`<NAMESPACE>`/`<PROJECT_NAME>`?state=opened<br>/gitlab/merge-requests/`<NAMESPACE>`/`<PROJECT_NAME>`?state=closed<br>/gitlab/merge-requests/`<NAMESPACE>`/`<PROJECT_NAME>`?state=locked<br>/gitlab/merge-requests/`<NAMESPACE>`/`<PROJECT_NAME>`?state=merged<br> | Merge Request count | <br><br><br><br><br> |
| /gitlab/stars/`<NAMESPACE>`/`<PROJECT_NAME>`<br> | Star count | <br> |
## Getting Started
This project includes a [Makefile](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:
```shell
❯ ./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](./LICENSE).
[](https://app.fossa.com/projects/git%2Bgithub.com%2Ftohjustin%2Faegis?ref=badge_large)