Skip to content

Commit

Permalink
Merge pull request robhurring#12 from stephenyeargin/bug/10-fix-version
Browse files Browse the repository at this point in the history
Use semantic versioning
  • Loading branch information
robhurring committed Jan 20, 2015
2 parents 81004fd + 519438c commit 27c5278
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 14 deletions.
12 changes: 12 additions & 0 deletions index.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
fs = require 'fs'
path = require 'path'

module.exports = (robot, scripts) ->
scriptsPath = path.resolve(__dirname, 'src/scripts')
fs.exists scriptsPath, (exists) ->
if exists
for script in fs.readdirSync(scriptsPath)
if scripts? and '*' not in scripts
robot.loadFile(scriptsPath, script) if script in scripts
else
robot.loadFile(scriptsPath, script)
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "redminejs",
"version": "0.1",
"name": "hubot-redmine",
"version": "0.1.0",
"author": "rob hurring",
"keywords": "hubot plugin scripts campfire bot robot redmine",
"description": "Basic redmine API for hubot or whatever",
Expand Down
29 changes: 17 additions & 12 deletions src/scripts/redmine.coffee → src/scripts/hubot-redmine.coffee
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
# (redmine|show) me <issue-id> - Show the issue status
# show (my|user's) issues - Show your issues or another user's issues
# assign <issue-id> to <user-first-name> ["notes"] - Assign the issue to the user (searches login or firstname)
# *With optional notes
# update <issue-id> with "<note>" - Adds a note to the issue
# add <hours> hours to <issue-id> ["comments"] - Adds hours to the issue with the optional comments
# link me <issue-id> - Returns a link to the redmine issue
# set <issue-id> to <int>% ["comments"] - Updates an issue and sets the percent done
# Description:
# Showing of redmine issuess via the REST API.
#
# Dependencies:
# None
#
# Note: <issue-id> can be formatted in the following ways:
# 1234, #1234, issue 1234, issue #1234
# Configuration:
# HUBOT_REDMINE_BASE_URL - URL to your Redmine install
# HUBOT_REDMINE_TOKEN - API key for your selected user
# HUBOT_REDMINE_SSL - Use "1" if your server uses SSL (https://)
#
#---
# Commands:
# (redmine|show) me <issue-id> - Show the issue status
# show (my|user's) issues - Show your issues or another user's issues
# assign <issue-id> to <user-first-name> ["notes"] - Assign the issue to the user (searches login or firstname)
# update <issue-id> with "<note>" - Adds a note to the issue
# add <hours> hours to <issue-id> ["comments"] - Adds hours to the issue with the optional comments
# link me <issue-id> - Returns a link to the redmine issue
# set <issue-id> to <int>% ["comments"] - Updates an issue and sets the percent done
#
# Showing of redmine issuess via the REST API.
#---
#
# To get set up refer to the guide http://www.redmine.org/projects/redmine/wiki/Rest_api#Authentication
# After that, heroku needs the following config
Expand Down

0 comments on commit 27c5278

Please sign in to comment.