Lolcommits Slack

Gem Travis Depfu Maintainability Test Coverage

lolcommits takes a snapshot with your webcam every time you git commit code, and archives a lolcat style image with it. Git blame has never been so much fun!

This plugin automatically posts your lolcommits to one (or more) Slack channels using Slack's modern file upload API.

The Slack post will contain the git commit message and repo name. The SHA is used as the uploaded file name. Each upload step will be retried (twice) should any error occur.

Requirements

Installation

Follow the install guide for lolcommits first. Then run the following:

$ gem install lolcommits-slack

Configuration

Next configure and enable with:

$ lolcommits --config -p slack
# set enabled to `true`
# enter your Oauth User token and Slack channel ID list (see below)

That's it! Every lolcommit will now be posted to these Slack channels. To disable simply reconfigure with enabled: false.

Authentication

NOTE: This plugin no longer supports Slack legacy tokens, a Slack app with OAuth is now required.

  • Open this URL to create a new Slack app (or view existing)
  • Ensure OAuth User Token Scopes includes files:write
  • Install the app to your Slack workspace
  • Use the app's User OAuth Token (e.g. xxxx-xxxxxxxxx-xxxx) when configuring with lolcommits --config -p slack

Channel List

You must supply one or more Slack channel IDs.

Grab a channel ID: right-click channel in side bar, select View Channel Details and look for a Channel ID e.g. C0FPKDOJJ

Development

Check out this repo and run bin/setup, this will install dependencies and generate docs. Run bundle exec rake to run all tests and generate a coverage report.

You can also run bin/console for an interactive prompt that will allow you to experiment with the gem code.

Tests

MiniTest is used for testing. Run the test suite with:

$ rake test

Docs

Generate docs for this gem with:

$ rake rdoc

Troubles?

If you think something is broken or missing, please raise a new issue. Take a moment to check it hasn't been raised in the past (and possibly closed).

TODO

  • [ ] Query for channel list and let user select

Contributing

Bug reports and pull requests are welcome on GitHub.

When submitting pull requests, remember to add tests covering any new behaviour, and ensure all tests are passing on Travis CI. Read the contributing guidelines for more details.

This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct. See here for more details.

License

The gem is available as open source under the terms of LGPL-3.