hubots/hubot-baronbogo/src/hubot-baronbogo.coffee
Line contains inconsistent indentation Open
Open
console.error("the environment variable REPOSITORY_NAME must be specified for hubot-baronbogo to work properly")
- Exclude checks
Line contains inconsistent indentation Open
Open
url = "https://api.github.com/users/" + res.match[2] + "/gists"
- Exclude checks
Line contains inconsistent indentation Open
Open
output = output + 'MORE ...\n'
- Exclude checks
Line contains inconsistent indentation Open
Open
if pullreq
- Exclude checks
Line contains inconsistent indentation Open
Open
issueText = "Pull Request"
- Exclude checks
Line contains inconsistent indentation Open
Open
url = "https://api.github.com/repos/" + res.match[1] + "/issues?state=open"
- Exclude checks
Line contains inconsistent indentation Open
Open
output = output + pad( '' + g.number, 8) + pad(g.user.login, 20) + ' ' + g.title + '\n'
- Exclude checks
Line contains inconsistent indentation Open
Open
res.send disp_issues(issues, false)
- Exclude checks
Line contains inconsistent indentation Open
Open
url = "https://api.github.com/repos/" + res.match[1] + "/issues?state=open"
- Exclude checks
Line contains inconsistent indentation Open
Open
url = "https://api.github.com/repos/" + our_repo + "/issues?state=open"
- Exclude checks
Line contains inconsistent indentation Open
Open
res.send disp_issue(issue)
- Exclude checks
Line contains inconsistent indentation Open
Open
res.send disp_issues(issues, false)
- Exclude checks
Line contains inconsistent indentation Open
Open
res.send disp_issue(issue)
- Exclude checks
Line contains inconsistent indentation Open
Open
url = "https://api.github.com/users/" + res.match[1] + "/gists"
- Exclude checks
Line contains inconsistent indentation Open
Open
github.get "https://api.github.com/gists/" + gists[parseInt(res.match[1]) - 1].id, (gist) ->
- Exclude checks
Line contains inconsistent indentation Open
Open
output = '```\n'
- Exclude checks
Line contains inconsistent indentation Open
Open
res.send disp_issues(issues, true)
- Exclude checks
Line contains inconsistent indentation Open
Open
url = "https://api.github.com/repos/" + our_repo + "/issues/" + res.match[2]
- Exclude checks
Line contains inconsistent indentation Open
Open
continue
- Exclude checks
Line contains inconsistent indentation Open
Open
output = output + 'MORE ...\n'
- Exclude checks
Line contains inconsistent indentation Open
Open
count = 1
- Exclude checks
Line contains inconsistent indentation Open
Open
our_repo = process.env['REPOSITORY_NAME']
- Exclude checks
Line contains inconsistent indentation Open
Open
if pullreq == true
- Exclude checks
Line contains inconsistent indentation Open
Open
res.send disp_issues(issues, true)
- Exclude checks
Line contains inconsistent indentation Open
Open
url = "https://api.github.com/repos/" + res.match[3] + '/issues/' + res.match[2]
- Exclude checks
Line contains inconsistent indentation Open
Open
output = output + pad( '' + count, 8) + g.description + '\n'
- Exclude checks
Line contains inconsistent indentation Open
Open
issueText = "Issue"
- Exclude checks
Line contains inconsistent indentation Open
Open
if g.pull_request?
- Exclude checks
Line contains inconsistent indentation Open
Open
url = "https://api.github.com/repos/" + our_repo + "/issues?state=open"
- Exclude checks
Line contains inconsistent indentation Open
Open
output = '```\n#ops:openeditor\n\n' + v.content + '\n```'
- Exclude checks
Line contains inconsistent indentation Open
Open
for k,v of gist.files
- Exclude checks
Line contains tab indentation Open
Open
res.send reply
- Exclude checks
Line contains tab indentation Open
Open
res.send disp_issues(issues, false)
- Exclude checks
Line contains tab indentation Open
Open
robot.respond /prs for (.*)/i, (res) ->
- Exclude checks
Line contains tab indentation Open
Open
robot.respond /our (pr|issue) (.*)/i, (res) ->
- Exclude checks
Line contains tab indentation Open
Open
url = "https://api.github.com/users/" + res.match[1] + "/gists"
- Exclude checks
Line contains tab indentation Open
Open
count = 1
- Exclude checks
Line contains tab indentation Open
Open
# handle gists
- Exclude checks
Line contains tab indentation Open
Open
github.get url, (gists) ->
- Exclude checks
Line contains tab indentation Open
Open
for g in issues
- Exclude checks
Line contains tab indentation Open
Open
output = '```\n'
- Exclude checks
Line contains tab indentation Open
Open
count = 0
- Exclude checks
Line contains tab indentation Open
Open
break
- Exclude checks
Line contains tab indentation Open
Open
output = output + pad( '' + g.number, 8) + pad(g.user.login, 20) + ' ' + g.title + '\n'
- Exclude checks
Line contains tab indentation Open
Open
count++
- Exclude checks
Line contains tab indentation Open
Open
#{issueText}: \##{issue.number}
- Exclude checks
Line contains tab indentation Open
Open
"""
- Exclude checks
Line contains tab indentation Open
Open
#{issue.body}
- Exclude checks
Line contains tab indentation Open
Open
robot.respond /our issues/i, (res) ->
- Exclude checks
Line exceeds maximum allowed length Open
Open
reply += "I can do webhooks, issues, merge requests, and gists out of the box.\n"
- Exclude checks
Line contains tab indentation Open
Open
url = "https://api.github.com/repos/" + our_repo + "/issues/" + res.match[2]
- Exclude checks
Line contains tab indentation Open
Open
reply += "get gist n for m - view gist #n for user #m\n"
- Exclude checks
Line contains tab indentation Open
Open
robot.respond /get gists for (.*)/i, (res) ->
- Exclude checks
Line contains tab indentation Open
Open
url = "https://api.github.com/repos/" + our_repo + "/issues?state=open"
- Exclude checks
Line contains tab indentation Open
Open
github.get url, (gists) ->
- Exclude checks
Line contains tab indentation Open
Open
github.get url, (issue) ->
- Exclude checks
Line contains tab indentation Open
Open
console.error("the environment variable REPOSITORY_NAME must be specified for hubot-baronbogo to work properly")
- Exclude checks
Line contains tab indentation Open
Open
# hook events handler
- Exclude checks
Line exceeds maximum allowed length Open
Open
output = output + pad( '' + g.number, 8) + pad(g.user.login, 20) + ' ' + g.title + '\n'
- Exclude checks
Line contains tab indentation Open
Open
output = """
- Exclude checks
Line contains tab indentation Open
Open
reply += "You can add me for your own public or private GitHub projects.\n"
- Exclude checks
Line contains tab indentation Open
Open
reply += "pr n for m - show merge request #n for project #m\n"
- Exclude checks
Line contains tab indentation Open
Open
if pullreq == true
- Exclude checks
Line contains tab indentation Open
Open
res.send disp_issues(issues, false)
- Exclude checks
Line contains tab indentation Open
Open
output = output + 'MORE ...\n'
- Exclude checks
Line exceeds maximum allowed length Open
Open
reply += "Please add to my abilities and contribute your code to Rocket.Chat.\n"
- Exclude checks
Line contains tab indentation Open
Open
robot.respond /our prs/i, (res) ->
- Exclude checks
Line contains tab indentation Open
Open
reply += "our issues - list open issues for the project\n"
- Exclude checks
Line contains tab indentation Open
Open
# console.log 'url' + url
- Exclude checks
Line contains tab indentation Open
Open
output = '```\n'
- Exclude checks
Line contains tab indentation Open
Open
break
- Exclude checks
Line contains tab indentation Open
Open
for g in gists
- Exclude checks
Line contains tab indentation Open
Open
else
- Exclude checks
Line contains tab indentation Open
Open
output = output + '```'
- Exclude checks
Line contains tab indentation Open
Open
disp_issue = (issue) ->
- Exclude checks
Line exceeds maximum allowed length Open
Open
reply += "Hi, my name is baronbogo, and I am the Rocket.Chat GitHub integration bot.\n"
- Exclude checks
Line contains tab indentation Open
Open
reply += "Find my code here:\n"
- Exclude checks
Line contains tab indentation Open
Open
url = "https://api.github.com/repos/" + res.match[1] + "/issues?state=open"
- Exclude checks
Line contains tab indentation Open
Open
github.get url, (issue) ->
- Exclude checks
Line contains tab indentation Open
Open
our_repo = process.env['REPOSITORY_NAME']
- Exclude checks
Line contains tab indentation Open
Open
output = output + '```'
- Exclude checks
Line contains tab indentation Open
Open
return output
- Exclude checks
Line contains tab indentation Open
Open
robot.respond /intro baronbogo/i, (res) ->
- Exclude checks
Line contains tab indentation Open
Open
url = "https://api.github.com/repos/" + res.match[3] + '/issues/' + res.match[2]
- Exclude checks
Line exceeds maximum allowed length Open
Open
# console.log 'If you are curious, I am listening to ' + robot.listeners.length + ' source'
- Exclude checks
Line contains tab indentation Open
Open
if count >= limit
- Exclude checks
Line contains tab indentation Open
Open
reply += "https://github.com/RocketChat/Rocket.Chat.Ops/tree/master/hubots/hubot-baronbogo\n"
- Exclude checks
Line contains tab indentation Open
Open
reply += "our prs - list open merge requests for the project\n"
- Exclude checks
Line contains tab indentation Open
Open
reply += "our issue n - show issue n for the project\n"
- Exclude checks
Line contains tab indentation Open
Open
robot.respond /issues for (.*)/i, (res) ->
- Exclude checks
Line contains tab indentation Open
Open
github.get url, (issues) ->
- Exclude checks
Line contains tab indentation Open
Open
output = output + pad( '' + count, 8) + g.description + '\n'
- Exclude checks
Line contains tab indentation Open
Open
url = "https://api.github.com/users/" + res.match[2] + "/gists"
- Exclude checks
Line contains tab indentation Open
Open
github = githubot(robot)
- Exclude checks
Line contains tab indentation Open
Open
disp_issues = (issues, pullreq) ->
- Exclude checks
Line contains tab indentation Open
Open
if pullreq
- Exclude checks
Line contains tab indentation Open
Open
reply += "Hi, my name is baronbogo, and I am the Rocket.Chat GitHub integration bot.\n"
- Exclude checks
Line contains tab indentation Open
Open
reply += "issue n for m - show issue #n for project #m\n"
- Exclude checks
Line contains tab indentation Open
Open
github.get url, (issues) ->
- Exclude checks
Line contains tab indentation Open
Open
github.get url, (issues) ->
- Exclude checks
Line contains tab indentation Open
Open
res.send disp_issue(issue)
- Exclude checks
Line contains tab indentation Open
Open
count++
- Exclude checks
Line exceeds maximum allowed length Open
Open
console.error("the environment variable REPOSITORY_NAME must be specified for hubot-baronbogo to work properly")
- Exclude checks
Line exceeds maximum allowed length Open
Open
output = output + pad( '' + g.number, 8) + pad(g.user.login, 20) + ' ' + g.title + '\n'
- Exclude checks
Line contains tab indentation Open
Open
count++
- Exclude checks
Line contains tab indentation Open
Open
Title: #{issue.title}
- Exclude checks
Line contains tab indentation Open
Open
Status: #{issue.state}
- Exclude checks
Line contains tab indentation Open
Open
reply += "gits for <userid> - list gists for specified GitHub user\n"
- Exclude checks
Line contains tab indentation Open
Open
# console.log 'url' + url
- Exclude checks
Line contains tab indentation Open
Open
if !our_repo?
- Exclude checks
Line contains tab indentation Open
Open
if g.pull_request?
- Exclude checks
Line contains tab indentation Open
Open
reply = ""
- Exclude checks
Line contains tab indentation Open
Open
url = "https://api.github.com/repos/" + our_repo + "/issues?state=open"
- Exclude checks
Line contains tab indentation Open
Open
github.get url, (issues) ->
- Exclude checks
Line contains tab indentation Open
Open
res.send disp_issues(issues, true)
- Exclude checks
Line contains tab indentation Open
Open
githubevents(robot)
- Exclude checks
Line contains tab indentation Open
Open
issueText = "Issue"
- Exclude checks
Line contains tab indentation Open
Open
reply += "Please add to my abilities and contribute your code to Rocket.Chat.\n"
- Exclude checks
Line contains tab indentation Open
Open
url = "https://api.github.com/repos/" + res.match[1] + "/issues?state=open"
- Exclude checks
Line exceeds maximum allowed length Open
Open
url = "https://api.github.com/repos/" + res.match[3] + '/issues/' + res.match[2]
- Exclude checks
Line contains tab indentation Open
Open
output = output + 'MORE ...\n'
- Exclude checks
Line contains tab indentation Open
Open
if issue.pull_request?
- Exclude checks
Line contains tab indentation Open
Open
return output
- Exclude checks
Line contains tab indentation Open
Open
robot.respond /(pr|issue) (.*) for (.*)/i, (res) ->
- Exclude checks
Line contains tab indentation Open
Open
continue
- Exclude checks
Line contains tab indentation Open
Open
issueText = "Pull Request"
- Exclude checks
Line contains tab indentation Open
Open
Url: #{issue.html_url}
- Exclude checks
Line contains tab indentation Open
Open
res.send disp_issue(issue)
- Exclude checks
Line contains tab indentation Open
Open
res.send output
- Exclude checks
Line contains tab indentation Open
Open
limit = 20
- Exclude checks
Line contains tab indentation Open
Open
output = output + pad( '' + g.number, 8) + pad(g.user.login, 20) + ' ' + g.title + '\n'
- Exclude checks
Line contains tab indentation Open
Open
Opened by: #{issue.user.login}
- Exclude checks
Line exceeds maximum allowed length Open
Open
reply += "https://github.com/RocketChat/Rocket.Chat.Ops/tree/master/hubots/hubot-baronbogo\n"
- Exclude checks
Line contains tab indentation Open
Open
res.send disp_issues(issues, true)
- Exclude checks
Line contains tab indentation Open
Open
robot.respond /get gist (.*) for (.*)/i, (res) ->
- Exclude checks
Line contains tab indentation Open
Open
if (count >= limit)
- Exclude checks
Line contains tab indentation Open
Open
reply += "I can do webhooks, issues, merge requests, and gists out of the box.\n"
- Exclude checks
Line contains tab indentation Open
Open
res.send output
- Exclude checks
Line contains tab indentation Open
Open
output = '```\n#ops:openeditor\n\n' + v.content + '\n```'
- Exclude checks
Line exceeds maximum allowed length Open
Open
github.get "https://api.github.com/gists/" + gists[parseInt(res.match[1]) - 1].id, (gist) ->
- Exclude checks
Line contains tab indentation Open
Open
for k,v of gist.files
- Exclude checks
Line contains tab indentation Open
Open
github.get "https://api.github.com/gists/" + gists[parseInt(res.match[1]) - 1].id, (gist) ->
- Exclude checks