Coder Social home page Coder Social logo

lolcommits / lolcommits-slack Goto Github PK

View Code? Open in Web Editor NEW
11.0 6.0 0.0 58 KB

Automatically post lolcommits to Slack

Home Page: https://lolcommits.github.io

License: GNU Lesser General Public License v3.0

Ruby 98.65% Shell 1.35%
lolcommits lolcommits-plugin slack fun git git-addons humor selfie ruby

lolcommits-slack's Introduction

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.

The Slack post will contain the git commit message and repo name. The SHA is used as the uploaded file name. Posting will be retried (once) 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 access 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.

Access Token

This plugin uses Slack legacy tokens for authentication. Create (or grab) them here.

Channel List

You must supply one or more Slack channel IDs. You can use Slack's own API testing tool to list all Slack channels in your account, and grab the IDs from the JSON response presented.

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

  • Use new Oauth / App (instead of legacy tokens)
  • 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.

Links

lolcommits-slack's People

Contributors

gnomus avatar matthutchinson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

lolcommits-slack's Issues

Broken with Ruby 2.4.2

It seems like this Plugin is broken if you use ruby 2.4.2

$ lolcommits -c
*** Preserving this moment in history.
Posting to Slack ... failed! key not found: :ciphers - retrying ...
Posting to Slack ... failed! key not found: :ciphers - giving up ...
Try running config again:
	lolcommits --config --p slack

With ruby 2.3.3 and the same config everything works :)

I could track this back to the rest-client dependency
rest-client/rest-client#569

According to this comment
https://github.com/lolcommits/lolcommits-slack/blob/master/lolcommits-slack.gemspec#L37
we are limited by the yammer Plugin but since it was moved to a seperate gem 20 Days ago this error might be fixable.

Configure for all repos?

Is there any means to configure the plugin globally rather than having to run the config step for every project?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.