Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/unknwon/orbiter
Orbiter is a tool for collecting and redistributing webhooks over the network.
https://github.com/unknwon/orbiter
collector go lsif-enabled redistributing-webhooks webhook
Last synced: 20 days ago
JSON representation
Orbiter is a tool for collecting and redistributing webhooks over the network.
- Host: GitHub
- URL: https://github.com/unknwon/orbiter
- Owner: unknwon
- License: apache-2.0
- Created: 2016-02-06T19:21:59.000Z (almost 9 years ago)
- Default Branch: main
- Last Pushed: 2021-09-23T16:22:57.000Z (about 3 years ago)
- Last Synced: 2024-10-04T13:25:44.284Z (about 1 month ago)
- Topics: collector, go, lsif-enabled, redistributing-webhooks, webhook
- Language: Go
- Homepage:
- Size: 1 MB
- Stars: 20
- Watchers: 4
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![](public/img/orbiter-brand.png)
Orbiter is a tool for collecting and redistributing webhooks over the network.
## NOTICES
- **This project comes with absolutely NO warranty for break changes**,
- ... but you can file bugs, feature requests and usage questions **if you have to**.## Features
- [x] Receive and save webhook by time, type (GitHub, etc) and tags (repository, owner, etc).
- [x] Redistribute webhook by APIs whenever and whatever it gets requested.
- [ ] Nice admin dashboard to config and do statistics.## WTF?
Oh well, it is just a tool to collect webhook history when you don't have time to process them at the moment.
Or, maybe you want to study the history later to understand a basic user action flow.
And nothing else, sorry!
## Installation
First of all, you need to install MySQL (WHAT?!).
Then, install Orbiter:
```sh
$ go get unknwon.dev/orbiter
```### Configuration
The default configuration is located at `conf/app.ini`, please create another file called `custom/app.ini` to adjust your own values.
Finally, execute `./orbiter`.
The server should start listening on `0.0.0.0:8085` by default, visit http://localhost:8085.
## Quick start
### Config new collector
Collector defines what the type (currently only support GitHub) and secret token should be.
**Secret token is auto-generated by Orbiter, you can ask to regenerate as many times as you prefer**.
Normally, one collector is for an individual repository, but that's up to you.
After creation, setup the webhook with secret token in corresponding hosting site.
For example, in GitHub:
- `Payload URL`: `https://orbiter.unknwon.io/hook?secret=mysecretweapon`
- `Content type`: `application/json`
- `Secret`: **REMAIN EMPTY**
- Events: **ORBITER DOES NOT CARE**### View recent history
You can go to `/webhooks` to view recent receive history of webhooks, and their payloads.
Important tags such as **repository owner**, **repository name**, **event type** and **sender** are extracted for payload automatically and can be used as query conditions for applications.
### Add new application
Application is basically nothing but contains a **access token** which is needed for calling APIs.
## APIs
**All parameters and access token is passed by URL query parameters.**
### List webhooks
```
GET /api/v1/webhooks
```##### Parameters
Following parameters are all optional, and combine with condition **AND**.
|Name|Description|
|----|-----------|
|`collector_id`|List webhooks that were received by certain collector|
|`owner`|List webhooks that belongs to certain repository owner|
|`repo_name`|List webhooks that belongs to certain repository|
|`event_type`|List webhooks that have certain event type|
|`sender`|List webhooks that were triggered by someone|
|`after`|List webhooks that received after certain time point, this value is Unix nanoseconds|
|`limit`|Maximum number of webhooks to response|##### Example
```
GET /api/v1/webhooks?token=mysecretdefense&event_type=issue_comment&after=1454740438165946316&limit=10
```## Acknowledgments
- [AdminLTE](https://almsaeedstudio.com/): Open source Bootstrap 3 admin template
- [Font Awesome](http://fontawesome.io/): The iconic font and CSS toolkit## Open-source, not open-contribution
_Quote from [benbjohnson/litestream](https://github.com/benbjohnson/litestream#open-source-not-open-contribution):_
> I am grateful for community involvement, bug reports, & feature requests. I do not wish to come off as anything but welcoming, however, I've made the decision to keep this project closed to contributions for my own mental health and long term viability of the project.
## License
This project is under the Apache License, Version 2.0. See the [LICENSE](LICENSE) file for the full license text.