README
versioneye-slack
Report VersionEye's information to Slack
Description
You can post the following VersionEye's information to Slack.
- your project summary

- your latest notifications

You can use this tool from CLI or programmatically.
Install
CLI
$ npm install versioneye-slack -g
programmatically
$ npm install versioneye-slack
Usage
CLI
$ versioneye-slack <options> <command>
Options
$ versioneye-slack -h
Environment Variables
You can path some options by environment variables. The command-line options are prior to environment variables.
VERSIONEYE_API_KEY
: equals to--versioneye-api-key
SLACK_WEBHOOK_URL
: equals to--slack-webhook-url
Sub-commands
project
Post a project summary to slack.
$ versioneye-slack project <projectName>
# e.g.
$ versioneye-slack project miyajan/versioneye-slack
The organizations's API key in your organization's setting page ( https://www.versioneye.com/organisations/<your org>/apikey
) is required.
or -o--org-name
Specify organization name when you execute with a personal API key.
notifications
Post the latest notifications to slack.
$ versioneye-slack notifications
The personal API key in your setting page (https://www.versioneye.com/settings/api) is required.
programmatically
You can use the same functions programmatically.
const VersionEyeSlack = require('versioneye-slack');
const versioneyeApiKey = '<api key for versioneye>';
const slackWebhookUrl = '<webhook url for slack>';
const versioneyeSlack = new VersionEyeSlack(versioneyeApiKey, slackWebhookUrl);
versioneyeSlack.postProjectSummary('project name').then(response => {
console.log(response);
});
postProjectSummary
: equals toversioneye-slack project
postNotifications
: equals toversioneye-slack notifications
All methods will return Promise. The response string will be passed to then
method when the request succeeds. The Error object with message string will be passed to catch
method when the request fails.
Contribution
- Fork
- Create a feature branch
- Commit your changes
- Rebase your local changes against the master branch
- Run
npm test
- Create new Pull Request
License
MIT
Author
miyajan: Jumpei Miyata miyajan777@gmail.com