This is a Rack Middleware app. It is heavily influenced by the Hanami web framework and dry-rb libraries. The app will accept json data posted to it from webhooks commonly used on version control systems (VCS).
There is no documentation given about setting up webhooks on any of the VCS platforms. Most VCS systems and vendors will have extensive doco for you to peruse on that topic.
Features:
- Supported Webhook Events
- Feature location:
lib/activity_monitor/json_parser/{all,subset}
- Push
- Pull Request event implemented
- Issue Created event implemented
- Comment event implemented
- Feature location:
- JSON payload parsing
- Feature location:
lib/activity_monitor/json_parser
- implemented
- Feature location:
- Provide support for the following third party services
- Feature location:
lib/activity_monitor/services/
- Github
- Gitlab
- Bitbucket
- Codeberg
- Source Hut (No webhooks yet)
- Custom git deployment
- Feature location:
- Create and maintain a list of URL endpoints which will receive JSON from externally configured webhooks
- Feature location:
lib/activity_monitor/routing && config/config.rb
- implemented
- configurable
- Feature location:
- Provide webhook verification for each service
- Feature location: ``
- Persistance features
- Feature location:
lib/activity_monitor/db
- Feature location:
Anti-features:
- No display or analysis of the data of any kind (see hheatmap for reference front-end) or write your own web app to grab the data from the db
Install the gem as a dependency through the usual bundle commands
$> bundle add activity_monitor
$ bundle exec hanami activity-monitor install
The app comes a Command Line Interface (CLI) tool to help with some tasks. The documentation for the tool is provided by the tool when used in conjunction with the --help
option.
Ex:
# List available rake tasks
bundle exec rake [--tasks|-T]
# Bundled activity monitor tool
bundle exec am --help
# bundle exec am COMMAND --help
bundle exec am run --help
# connect to the db to run some command
DATABASE_URL="sqlite://./.data/am.db" bundle exec rake db:clean
After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and the created tag, and push the .gem
file to rubygems.org.
The gem is available as open source under the terms of the MIT License.