Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/codex-team/hawk.releases
Useful scripts and guides for sending releases to Hawk
https://github.com/codex-team/hawk.releases
error-tracking monitoring
Last synced: 8 days ago
JSON representation
Useful scripts and guides for sending releases to Hawk
- Host: GitHub
- URL: https://github.com/codex-team/hawk.releases
- Owner: codex-team
- License: mit
- Created: 2021-08-26T17:26:21.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-04T16:28:27.000Z (over 2 years ago)
- Last Synced: 2024-09-02T09:46:52.525Z (2 months ago)
- Topics: error-tracking, monitoring
- Language: Shell
- Homepage: https://hawk.so
- Size: 38.1 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hawk releases
Hawk releases sender will help you collect commits data and send as releases.
You can use this [action](#action) in workflow or pull the bash [script](#script) and run it yourself.
## Action
Use `codex-team/hawk.releases@v1` in build workflow to send commits as release data to Hawk.
### Inputs
#### `release` (required)
Release identifier. For example package version or any other defined value which will be available in project's code.
#### `token` (required)
Project token from Hawk.
#### `collectorEndpoint`
Optional custom collector endpoint.
### Example of usage
```
- name: Get package info
id: package
uses: codex-team/action-nodejs-package-info@v1- name: Send release data
uses: codex-team/hawk.releases@v1
with:
release: ${{ steps.package.outputs.name }}-${{ steps.package.outputs.version }}
token: ${{ secrets.HAWK_TOKEN }}
```## Script
To make it easier to send commits, you can use a shell script [hawk-releases.sh](bin/hawk-releases.sh)
that will take the last few commits and send them to the collector.### [hawk-releases.sh](bin/hawk-releases.sh) arguments
| Argument name | Required | Description |
| -- | -- | -- |
| `-t` \| `--token` | Yes | Hawk integration token for your project. |
| `-r` \| `--release` | Yes | Release name. Any string that will be associated with project events. |
| `-ce` \| `--collectorEndpoint` | No | Endpoint to send release data. |Get the script
```bash
curl https://raw.githubusercontent.com/codex-team/hawk.release/master/bin/hawk-releases.sh -O
```Example of a script call:
```bash
./hawk-releases.sh -r="Version 2.0.1" -t=eyJpbnRlZ3JhdGlvbklkIjoiNTczM2ViODgtMDEzZi00MzE3LTkyMWQtNWViYWY3OTljNmYyIiwic2VjcmV0IjoiZmE3OGI2NjMtMTg5OS00NzUzLTgwOTktODlhYTdmMjA4MjJjIn0=
```Expected output:
```
Sending 2 commits for the 'Version 2.0.1' release to https://5733eb88-013f-4317-921d-5ebaf799c6f2.k1.hawk.so/release
{"code":200,"error":false,"message":"OK"}
```