Skip to content

Commit

Permalink
Merge pull request #19 from mbland/rename
Browse files Browse the repository at this point in the history
Rename files and references to slack-emoji-issues
  • Loading branch information
mbland committed Nov 5, 2017
2 parents c164335 + c434f25 commit 924b6ae
Show file tree
Hide file tree
Showing 14 changed files with 33 additions and 33 deletions.
6 changes: 3 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Expand Up @@ -4,9 +4,9 @@
contribution under the same terms as [this project's license][license], and
that I have the right to license my contribution under those terms.

[contrib]: https://github.com/mbland/slack-github-issues/blob/master/CONTRIBUTING.md
[conduct]: https://github.com/mbland/slack-github-issues/blob/master/CODE_OF_CONDUCT.md
[contrib]: https://github.com/mbland/slack-emoji-issues/blob/master/CONTRIBUTING.md
[conduct]: https://github.com/mbland/slack-emoji-issues/blob/master/CODE_OF_CONDUCT.md
[gh-tos]: https://help.github.com/articles/github-terms-of-service/#6-contributions-under-repository-license
[license]: https://github.com/mbland/slack-github-issues/blob/master/LICENSE.md
[license]: https://github.com/mbland/slack-emoji-issues/blob/master/LICENSE.md

cc: @mbland
4 changes: 2 additions & 2 deletions bin/slack-github-issues → bin/slack-emoji-issues
Expand Up @@ -14,14 +14,14 @@ var usage = [
'Where:',
' -h, --help, help show this help',
' -v, --version, version show version info',
' print-template print an example slack-github-issues.json config',
' print-template print an example slack-emoji-issues.json config',
' validate <config.json> validate the specified config file'
].join('\n');

var showHelp, showVersion;

if (option === 'print-template') {
var config = require('../config/slack-github-issues.json');
var config = require('../config/slack-emoji-issues.json');
console.log(JSON.stringify(config, null, 2));
process.exit(0);
}
Expand Down
Expand Up @@ -8,7 +8,7 @@
"rules": [
{
"reactionName": "book",
"githubRepository": "slack-github-issues"
"githubRepository": "slack-emoji-issues"
}
]
}
6 changes: 3 additions & 3 deletions hubot/slack-github-issues.js → hubot/slack-emoji-issues.js
@@ -1,5 +1,5 @@
// Description:
// Uses the Slack Real Time Messaging API to file GitHub issues
// Uses the Slack Real Time Messaging API to file issues from emoji reactions
//
// Configuration:
// HUBOT_SLACK_GITHUB_ISSUES_CONFIG_PATH
Expand All @@ -21,7 +21,7 @@ function configParams() {
var params = {updates: {}}

params.path = process.env.HUBOT_SLACK_GITHUB_ISSUES_CONFIG_PATH ||
path.join('config', 'slack-github-issues.json')
path.join('config', 'slack-emoji-issues.json')

params.updates.slackApiToken = process.env.HUBOT_SLACK_TOKEN
params.updates.githubApiToken = process.env.HUBOT_GITHUB_TOKEN
Expand All @@ -38,7 +38,7 @@ function slackDataStore(robot) {

function fileIssue(robot, filer, response) {
// ReactionMessage (node_modules/hubot-slack/src/reaction-message.coffee) will
// trim the 'reaction_' prefix from 'reaction_added'. The slack-github-issues
// trim the 'reaction_' prefix from 'reaction_added'. The slack-emoji-issues
// library requires we put it back.
response.message.type = 'reaction_' + response.message.type

Expand Down
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -53,6 +53,6 @@ module.exports = exports = {
path = require('path')

logger.info(null, 'loading')
robot.loadFile(path.resolve(__dirname, 'hubot'), 'slack-github-issues.js')
robot.loadFile(path.resolve(__dirname, 'hubot'), 'slack-emoji-issues.js')
}
}
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
@@ -1,12 +1,12 @@
{
"name": "slack-github-issues",
"name": "slack-emoji-issues",
"version": "1.1.1",
"author": "Mike Bland <mbland@acm.org> (https://mike-bland.com/)",
"description": "Uses Slack `reaction_added` events to file GitHub issues",
"license": "ISC",
"main": "index.js",
"bin": {
"slack-github-issues": "./bin/slack-github-issues"
"slack-emoji-issues": "./bin/slack-emoji-issues"
},
"engines": {
"node": ">=4.2"
Expand Down Expand Up @@ -34,14 +34,14 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/mbland/slack-github-issues.git"
"url": "git+https://github.com/mbland/slack-emoji-issues.git"
},
"keywords": [
"slack",
"github"
],
"bugs": {
"url": "https://github.com/mbland/slack-github-issues/issues"
"url": "https://github.com/mbland/slack-emoji-issues/issues"
},
"homepage": "https://github.com/mbland/slack-github-issues#readme"
"homepage": "https://github.com/mbland/slack-emoji-issues#readme"
}
4 changes: 2 additions & 2 deletions scripts/test
@@ -1,5 +1,5 @@
#! /bin/bash
#
#
# Run automated tests
#
# Usage:
Expand Down Expand Up @@ -152,7 +152,7 @@ _test_coverage() {
return 1
fi
echo -n 'Coverage report sent to Code Climate: '
echo 'https://codeclimate.com/github/mbland/slack-github-issues'
echo 'https://codeclimate.com/github/mbland/slack-emoji-issues'
fi
fi
}
Expand Down
6 changes: 3 additions & 3 deletions tests/config-test.js
Expand Up @@ -58,7 +58,7 @@ describe('Config', function() {
configData.rules[0].xyzzy = 'plugh'
configData.rules.push({
'reactionName': 'smiley',
'githubRepository': 'mbland/slack-github-issues',
'githubRepository': 'mbland/slack-emoji-issues',
'channelNames': ['hub'],
'quux': {}
})
Expand Down Expand Up @@ -153,7 +153,7 @@ describe('Config', function() {
githubRepository: 'hubot-slack-github-issues'
},
{ reactionName: 'evergreen_tree',
githubRepository: 'slack-github-issues',
githubRepository: 'slack-emoji-issues',
channelNames: ['bot-dev']
},
{ reactionName: 'evergreen_tree',
Expand All @@ -179,7 +179,7 @@ describe('Config', function() {
githubRepository: 'handbook'
},
{ reactionName: 'evergreen_tree',
githubRepository: 'slack-github-issues',
githubRepository: 'slack-emoji-issues',
channelNames: ['bot-dev']
},
{ reactionName: 'smiley',
Expand Down
2 changes: 1 addition & 1 deletion tests/helpers/index.js
Expand Up @@ -15,7 +15,7 @@ exports = module.exports = {
PRIVATE_CHANNEL_NAME: 'private-bot-dev',
TIMESTAMP: '1360782804.083113',
PERMALINK: 'https://mbland.slack.com/archives/bot-dev/p1360782804083113',
ISSUE_URL: 'https://github.com/mbland/slack-github-issues/issues/1',
ISSUE_URL: 'https://github.com/mbland/slack-emoji-issues/issues/1',
MESSAGE_ID: 'T19845150:C5150OU812:1360782804.083113',

baseConfig: function() {
Expand Down
2 changes: 1 addition & 1 deletion tests/helpers/test-config.json
Expand Up @@ -8,7 +8,7 @@
"rules": [
{
"reactionName": "evergreen_tree",
"githubRepository": "slack-github-issues",
"githubRepository": "slack-emoji-issues",
"channelNames": ["bot-dev"]
},

Expand Down
12 changes: 6 additions & 6 deletions tests/integration-test.js
Expand Up @@ -2,7 +2,7 @@

require('coffee-script/register')
var Helper = require('hubot-test-helper')
var scriptHelper = new Helper('../hubot/slack-github-issues.js')
var scriptHelper = new Helper('../hubot/slack-emoji-issues.js')
var User = require('@slack/client/lib/models/user')
var ReactionMessage = require('hubot-slack/src/reaction-message')

Expand Down Expand Up @@ -30,7 +30,7 @@ describe('Integration test', function() {
apiServerDefaults, reactionAddedMessage, patchListenerImpl, sendReaction,
initLogMessages, wrapInfoMessages,
matchingRule = 'reactionName: evergreen_tree, ' +
'githubRepository: slack-github-issues, ' +
'githubRepository: slack-emoji-issues, ' +
'channelNames: bot-dev'

before(function() {
Expand Down Expand Up @@ -104,7 +104,7 @@ describe('Integration test', function() {
statusCode: 200,
payload: helpers.getReactionsResponse()
},
'/github/repos/mbland/slack-github-issues/issues': {
'/github/repos/mbland/slack-emoji-issues/issues': {
expectedParams: {
title: metadata.title,
body: metadata.url
Expand Down Expand Up @@ -225,7 +225,7 @@ describe('Integration test', function() {
'processing: ' + helpers.PERMALINK,
'matches rule: ' + matchingRule,
'getting reactions',
'filing GitHub issue in mbland/slack-github-issues',
'filing GitHub issue in mbland/slack-emoji-issues',
'adding ' + config.successReaction,
'created: ' + helpers.ISSUE_URL
]))
Expand All @@ -235,7 +235,7 @@ describe('Integration test', function() {

it('should fail to create a GitHub issue', function() {
var payload = { message: 'test failure' },
url = '/github/repos/mbland/slack-github-issues/issues',
url = '/github/repos/mbland/slack-emoji-issues/issues',
response = apiStubServer.urlsToResponses[url],
errorReply = 'failed to create a GitHub issue: ' +
'received 500 response from GitHub API: ' + JSON.stringify(payload)
Expand All @@ -254,7 +254,7 @@ describe('Integration test', function() {
'processing: ' + helpers.PERMALINK,
'matches rule: ' + matchingRule,
'getting reactions',
'filing GitHub issue in mbland/slack-github-issues'
'filing GitHub issue in mbland/slack-emoji-issues'
]))
logMessages.push('ERROR ' + helpers.MESSAGE_ID + ': ' + errorReply)
logHelper.filteredMessages().should.eql(logMessages)
Expand Down
2 changes: 1 addition & 1 deletion tests/reaction-issue-filer-test.js
Expand Up @@ -139,7 +139,7 @@ describe('ReactionIssueFiler', function() {
helpers.logArgs('matches rule:', matchingRule.toLogString()),
helpers.logArgs('getting reactions'),
helpers.logArgs('filing GitHub issue in ' +
'mbland/slack-github-issues'),
'mbland/slack-emoji-issues'),
helpers.logArgs('adding', helpers.baseConfig().successReaction),
helpers.logArgs('created: ' + helpers.ISSUE_URL)
])
Expand Down
6 changes: 3 additions & 3 deletions tests/rule-test.js
Expand Up @@ -8,7 +8,7 @@ describe('Rule', function() {
var makeConfigRule = function() {
return {
reactionName: 'evergreen_tree',
githubRepository: 'slack-github-issues',
githubRepository: 'slack-emoji-issues',
channelNames: ['bot-dev']
}
}
Expand All @@ -34,7 +34,7 @@ describe('Rule', function() {
configRule.channelNames.push('general')
expect(new Rule(configRule).toLogString())
.to.eql('reactionName: evergreen_tree, ' +
'githubRepository: slack-github-issues, ' +
'githubRepository: slack-emoji-issues, ' +
'channelNames: bot-dev,general')
})

Expand All @@ -43,7 +43,7 @@ describe('Rule', function() {
delete configRule.channelNames
expect(new Rule(configRule).toLogString())
.to.eql('reactionName: evergreen_tree, ' +
'githubRepository: slack-github-issues')
'githubRepository: slack-emoji-issues')
})
})

Expand Down

0 comments on commit 924b6ae

Please sign in to comment.