GithubHelp home page GithubHelp logo

seanburke-wf / bendium Goto Github PK

View Code? Open in Web Editor NEW

This project forked from patkujawa-wf/bendium

0.0 0.0 0.0 306 KB

A Chrome extension for talking to Bender.

Dart 92.35% HTML 2.60% CSS 4.48% Shell 0.57%

bendium's Introduction

Bendium

Bendium is a Chrome extension for talking to Bender.

Install

Bendium is available in the Workiva section of the Chrome Web Store.

You'll need to get a HipChat API token. Log into the HipChat web interface (you can just click "Profile" within the desktop client). Then select "API Access" on the left and create a new token. It only requires the "Send Message" scope.

You can set keyboard shortcuts for Bendium commands using the standard chrome://extensions page mechanism: creating keyboard shortcuts

Build

pub get
pub build extension
# or, if you want sourcemaps to know where your code fails,
pub build extension --mode=debug

Install the build/extension/ directory.

Test

alias ddev='pub run dart_dev'
ddev gen-test-runner
ddev test -p content-shell

Add an action

It is fairly simple to add a new Bender action. Take a look at lib/src/actions.dart for some examples. Here's a prototypical one:

final Action createJiraTicket = new ActionImpl(
  // A function that takes the current URL and the action's parameter
  // value, which will be sent to Bender after the command name.
  getMessage: (String url, String value) {
    var validUrl = validateAndCoerceToPullRequestUrl(url);
    return 'rogue ticket $validUrl $value';
  },
  
  // A function to determine whether this action should be allowed
  // for a given page. It accepts the URL.
  isActive: Action.isPullRequestUrl,
  
  // The name of the parameter that will be passed to bender after
  // the command name. Leave it `null` if you don't want to use a
  // parameter.
  parameterName: 'Project',
  
  // The action's title that will be shown to users.
  title: 'Create JIRA Ticket',
);

Aside from the above, you just have to make sure to add your action to the actions list in the same file.

Credits

Icon courtesy of Herbert Spencer and licensed CC-BY.

bendium's People

Contributors

charliekump-wf avatar georgelesica-wf avatar glesica avatar patkujawa-wf avatar todbachman-wf avatar

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.