hubots/hubot-gitsy/src/hubot-gitsy.coffee
Line contains inconsistent indentation Open
Open
if gitlabApiToken?
- Exclude checks
Line contains inconsistent indentation Open
Open
reply += pad("" + snippet.id , 8) + pad(snippet.author.name,20) + snippet.title + "\n"
- Exclude checks
Line contains inconsistent indentation Open
Open
break
- Exclude checks
Line contains inconsistent indentation Open
Open
gitlab.projects.all (projects) =>
- Exclude checks
Line contains inconsistent indentation Open
Open
reply += pad("" + (idx + 1), 8) + pad(project.name, 20) + project.created_at + "\n"
- Exclude checks
Line contains inconsistent indentation Open
Open
reply += pad("" + issue.iid , 8) + pad(issue.author.name,20) + issue.title + "\n"
- Exclude checks
Line contains inconsistent indentation Open
Open
break
- Exclude checks
Line contains inconsistent indentation Open
Open
gitlab.projects.all (projects) =>
- Exclude checks
Line contains inconsistent indentation Open
Open
gitlabURL = process.env['GITLAB_URL']
- Exclude checks
Line contains inconsistent indentation Open
Open
break
- Exclude checks
Line contains inconsistent indentation Open
Open
reply += pad("Issue #" ,20) + issue.iid + "\n"
- Exclude checks
Line contains inconsistent indentation Open
Open
gitlab.projects.all (projects) =>
- Exclude checks
Line contains inconsistent indentation Open
Open
reply += pad("" + issue.iid , 8) + pad(issue.author.name,20) + issue.title + "\n"
- Exclude checks
Line contains inconsistent indentation Open
Open
gitlab.projects.all (projects) =>
- Exclude checks
Line contains inconsistent indentation Open
Open
break
- Exclude checks
Line contains inconsistent indentation Open
Open
gitlab.projects.all (projects) =>
- Exclude checks
Line contains inconsistent indentation Open
Open
console.error("the environment variable GITLAB_URL must be set for hubot-gitsy to work properly")
- Exclude checks
Line contains inconsistent indentation Open
Open
icon = ""
- Exclude checks
Line contains inconsistent indentation Open
Open
reply = "```\n"
- Exclude checks
Line contains inconsistent indentation Open
Open
icon = ""
- Exclude checks
Line contains inconsistent indentation Open
Open
reply += pad("Issue #",20) + issue.iid + "\n"
- Exclude checks
Line contains inconsistent indentation Open
Open
break
- Exclude checks
Line contains inconsistent indentation Open
Open
reply = "```\n"
- Exclude checks
Line contains inconsistent indentation Open
Open
gitlab.projects.all (projects) ->
- Exclude checks
Line contains inconsistent indentation Open
Open
reply = "```\n"
- Exclude checks
Line contains inconsistent indentation Open
Open
console.error("the environment variable GITLAB_API_KEY must be set for hubot-gitsy to work properly")
- Exclude checks
Line contains inconsistent indentation Open
Open
gitlab.projects.all (projects) =>
- Exclude checks
Line contains inconsistent indentation Open
Open
desc = issue.description.split("\*\*Imported")[0]
- Exclude checks
Line contains inconsistent indentation Open
Open
reply = "```\n"
- Exclude checks
Line contains tab indentation Open
Open
gitlabApiToken = process.env['GITLAB_API_KEY']
- Exclude checks
Line contains tab indentation Open
Open
if gitlabURL?
- Exclude checks
Line contains tab indentation Open
Open
gitlab = gitlabaccess({'url': gitlabURL , 'token': gitlabApiToken })
- Exclude checks
Line contains tab indentation Open
Open
# setup webhooks for incoming
- Exclude checks
Line exceeds maximum allowed length Open
Open
reply += "Hi, my name is gitsy, and I am the Rocket.Chat gitlab integration bot.\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
for project, idx in projects
- Exclude checks
Line contains tab indentation Open
Open
reply += pad("" + (idx + 1), 8) + pad(project.name, 20) + project.created_at + "\n"
- Exclude checks
Unnecessary fat arrow Open
Open
gitlab.projects.all (projects) =>
- Exclude checks
Line contains tab indentation Open
Open
gitlab.projects.issues.list selproj.id, {'iid': parseInt(res.match[1])}, (issues) ->
- Exclude checks
Line contains tab indentation Open
Open
reply = "```\n"
- Exclude checks
Line contains tab indentation Open
Open
reply += "```"
- Exclude checks
Line contains tab indentation Open
Open
if idx > limit
- Exclude checks
Line contains tab indentation Open
Open
# desc = issue.description.split("\*\*Imported")[0]
- Exclude checks
Line contains tab indentation Open
Open
reply += "```"
- Exclude checks
Line exceeds maximum allowed length Open
Open
console.error("the environment variable GITLAB_URL must be set for hubot-gitsy to work properly")
- Exclude checks
Line exceeds maximum allowed length Open
Open
reply += "https://github.com/RocketChat/Rocket.Chat.Ops/tree/master/hubots/hubot-gitsy\n"
- Exclude checks
Line contains tab indentation Open
Open
reply += "snippets for n - list snippets for project #n\n"
- Exclude checks
Line contains tab indentation Open
Open
robot.respond /issues for (.*)/i, (res) ->
- Exclude checks
Line contains tab indentation Open
Open
if (issue.description.indexOf("**Imported") > -1)
- Exclude checks
Line contains tab indentation Open
Open
robot.respond /pr (.*) for (.*)/i, (res) ->
- Exclude checks
Line contains tab indentation Open
Open
# console.log "PROJECT ID " + selproj.id
- Exclude checks
Line exceeds maximum allowed length Open
Open
gitlab.projects.merge_requests.list selproj.id, {'iid': parseInt(res.match[1])}, (issues) ->
- Exclude checks
Line contains tab indentation Open
Open
else
- Exclude checks
Line contains tab indentation Open
Open
robot.respond /intro gitsy/i, (res) ->
- Exclude checks
Line contains tab indentation Open
Open
# console.log "PROJECT ID " + selproj.id
- Exclude checks
Line contains tab indentation Open
Open
if idx > limit
- Exclude checks
Line contains tab indentation Open
Open
reply = "```\n"
- Exclude checks
Line contains tab indentation Open
Open
gitlabURL = process.env['GITLAB_URL']
- Exclude checks
Line contains tab indentation Open
Open
if gitlabApiToken?
- Exclude checks
Line contains tab indentation Open
Open
console.error("the environment variable GITLAB_API_KEY must be set for hubot-gitsy to work properly")
- Exclude checks
Line contains tab indentation Open
Open
console.error("the environment variable GITLAB_URL must be set for hubot-gitsy to work properly")
- Exclude checks
Line contains tab indentation Open
Open
reply += "You can add me for your own Gitlab CE projects or Gitlab cloud public projects.\n"
- Exclude checks
Line contains tab indentation Open
Open
reply += pad("" + issue.iid , 8) + pad(issue.author.name,20) + issue.title + "\n"
- Exclude checks
Line contains tab indentation Open
Open
res.send reply
- Exclude checks
Line contains tab indentation Open
Open
gitlab.projects.all (projects) =>
- Exclude checks
Line contains tab indentation Open
Open
gitlab.projects.merge_requests.list selproj.id, {'iid': parseInt(res.match[1])}, (issues) ->
- Exclude checks
Line contains tab indentation Open
Open
# console.log "PROJECT ID " + selproj.id
- Exclude checks
Line contains tab indentation Open
Open
gitlab.projects.listSnippets {id: selproj.id}, (snippets) ->
- Exclude checks
Line contains tab indentation Open
Open
for snippet, idx in snippets
- Exclude checks
Line contains tab indentation Open
Open
selproj = projects[parseInt(res.match[2]) - 1]
- Exclude checks
Line contains tab indentation Open
Open
snippetid = parseInt(res.match[1])
- Exclude checks
Line contains tab indentation Open
Open
# console.log "PROJECT ID " + selproj.id
- Exclude checks
Line contains tab indentation Open
Open
reply += "\n```"
- Exclude checks
Line contains tab indentation Open
Open
reply += "issues for n - list open issues for project #n\n"
- Exclude checks
Line exceeds maximum allowed length Open
Open
reply += pad("" + (idx + 1), 8) + pad(project.name, 20) + project.created_at + "\n"
- Exclude checks
Line contains tab indentation Open
Open
desc = issue.description.split("\*\*Imported")[0]
- Exclude checks
Line contains tab indentation Open
Open
reply += "Body:\n" + desc + "\n"
- Exclude checks
Line contains tab indentation Open
Open
selproj = projects[parseInt(res.match[1]) - 1]
- Exclude checks
Line contains tab indentation Open
Open
if idx > limit
- Exclude checks
Line contains tab indentation Open
Open
robot.respond /snippets for (.*)/i, (res) ->
- Exclude checks
Line contains tab indentation Open
Open
selproj = projects[parseInt(res.match[1]) - 1]
- Exclude checks
Line contains tab indentation Open
Open
reply += "I can do webhooks, issues, merge requests, and snippets out of the box.\n"
- Exclude checks
Line contains tab indentation Open
Open
reply = "```\n"
- Exclude checks
Line exceeds maximum allowed length Open
Open
gitlab.projects.issues.list selproj.id, {'iid': parseInt(res.match[1])}, (issues) ->
- Exclude checks
Line contains tab indentation Open
Open
icon = ""
- Exclude checks
Line contains tab indentation Open
Open
reply += "```"
- Exclude checks
Line contains tab indentation Open
Open
selproj = projects[parseInt(res.match[1]) - 1]
- Exclude checks
Line contains tab indentation Open
Open
gitlab.projects.all (projects) =>
- Exclude checks
Line contains tab indentation Open
Open
for issue, idx in issues
- Exclude checks
Line contains tab indentation Open
Open
robot.respond /projects/i, (res) ->
- Exclude checks
Line contains tab indentation Open
Open
if idx > limit
- Exclude checks
Line contains tab indentation Open
Open
gitlab.projects.all (projects) ->
- Exclude checks
Line contains tab indentation Open
Open
res.send reply
- Exclude checks
Line contains tab indentation Open
Open
reply += "```"
- Exclude checks
Line contains tab indentation Open
Open
for issue, idx in issues
- Exclude checks
Line contains tab indentation Open
Open
reply += pad("Opened by" , 20) + issue.author.name + "\n"
- Exclude checks
Line contains tab indentation Open
Open
reply += pad("Title", 20) + issue.title + "\n"
- Exclude checks
Line contains tab indentation Open
Open
res.send reply
- Exclude checks
Line contains tab indentation Open
Open
break
- Exclude checks
Unnecessary fat arrow Open
Open
gitlab.projects.all (projects) =>
- Exclude checks
Line contains tab indentation Open
Open
gitlab.projects.merge_requests.list selproj.id, {'state': 'opened'}, (issues) ->
- Exclude checks
Line contains tab indentation Open
Open
break
- Exclude checks
Line contains tab indentation Open
Open
break
- Exclude checks
Line contains tab indentation Open
Open
robot.respond /snippet (.*) for (.*)/i, (res) ->
- Exclude checks
Unnecessary fat arrow Open
Open
gitlab.projects.all (projects) =>
- 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
gitlabwebhook(robot)
- Exclude checks
Line contains tab indentation Open
Open
reply += "```"
- Exclude checks
Line contains tab indentation Open
Open
icon = ""
- Exclude checks
Line contains tab indentation Open
Open
desc = issue.description
- Exclude checks
Line contains tab indentation Open
Open
selproj = projects[parseInt(res.match[2]) - 1]
- Exclude checks
Line contains tab indentation Open
Open
icon = issue.author.avatar_url
- Exclude checks
Line contains tab indentation Open
Open
reply = "```\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
gitlab.projects.all (projects) =>
- Exclude checks
Line contains tab indentation Open
Open
reply += "snippet n for m - view snippet #n for project #m\n"
- Exclude checks
Line exceeds maximum allowed length Open
Open
reply += pad("" + issue.iid , 8) + pad(issue.author.name,20) + issue.title + "\n"
- Exclude checks
Line contains tab indentation Open
Open
res.send reply
- Exclude checks
Line contains tab indentation Open
Open
reply += pad("" + issue.iid , 8) + pad(issue.author.name,20) + issue.title + "\n"
- Exclude checks
Unnecessary fat arrow Open
Open
gitlab.projects.all (projects) =>
- Exclude checks
Line exceeds maximum allowed length Open
Open
reply += pad("" + issue.iid , 8) + pad(issue.author.name,20) + issue.title + "\n"
- Exclude checks
Line exceeds maximum allowed length Open
Open
gitlab.projects.merge_requests.list selproj.id, {'state': 'opened'}, (issues) ->
- Exclude checks
Line contains tab indentation Open
Open
break
- Exclude checks
Line contains tab indentation Open
Open
reply += pad("Opened by" ,20) + issue.author.name + "\n"
- Exclude checks
Unnecessary fat arrow Open
Open
gitlab.projects.all (projects) =>
- Exclude checks
Line contains tab indentation Open
Open
desc = issue.description
- Exclude checks
Line contains tab indentation Open
Open
reply += "Body:\n" + desc + "\n"
- Exclude checks
Line contains tab indentation Open
Open
res.send reply
- Exclude checks
Line exceeds maximum allowed length Open
Open
reply += pad("" + snippet.id , 8) + pad(snippet.author.name,20) + snippet.title + "\n"
- Exclude checks
Line contains tab indentation Open
Open
reply += "# ops:gitlabopencode\n#\n"
- Exclude checks
Line contains tab indentation Open
Open
res.send reply
- Exclude checks
Line contains tab indentation Open
Open
limit = 20
- Exclude checks
Line contains tab indentation Open
Open
reply = ""
- Exclude checks
Line contains tab indentation Open
Open
reply += "Hi, my name is gitsy, and I am the Rocket.Chat gitlab 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
reply += "Please add to my abilities and contribute your code to Rocket.Chat.\n"
- Exclude checks
Line exceeds maximum allowed length Open
Open
console.error("the environment variable GITLAB_API_KEY must be set for hubot-gitsy to work properly")
- Exclude checks
Line contains tab indentation Open
Open
reply += "projects - list all projects available\n"
- Exclude checks
Line contains tab indentation Open
Open
for issue, idx in issues
- Exclude checks
Line contains tab indentation Open
Open
for issue, idx in issues
- Exclude checks
Line contains tab indentation Open
Open
reply = "```\n"
- Exclude checks
Line contains tab indentation Open
Open
gitlab.projects.all (projects) =>
- Exclude checks
Line contains tab indentation Open
Open
reply += pad("Issue #",20) + issue.iid + "\n"
- Exclude checks
Unnecessary fat arrow Open
Open
gitlab.projects.all (projects) =>
- Exclude checks
Line contains tab indentation Open
Open
res.send reply
- Exclude checks
Line contains tab indentation Open
Open
reply += "https://github.com/RocketChat/Rocket.Chat.Ops/tree/master/hubots/hubot-gitsy\n"
- Exclude checks
Line contains tab indentation Open
Open
robot.respond /prs for (.*)/i, (res) ->
- Exclude checks
Line exceeds maximum allowed length Open
Open
reply += "I can do webhooks, issues, merge requests, and snippets out of the box.\n"
- Exclude checks
Line contains tab indentation Open
Open
res.send reply
- Exclude checks
Line contains tab indentation Open
Open
# console.log "PROJECT ID " + selproj.id
- Exclude checks
Line contains tab indentation Open
Open
reply = "```\n"
- Exclude checks
Line contains tab indentation Open
Open
reply += "```"
- Exclude checks
Line contains tab indentation Open
Open
break
- Exclude checks
Line contains tab indentation Open
Open
selproj = projects[parseInt(res.match[2]) - 1]
- Exclude checks
Line contains tab indentation Open
Open
reply += pad("Title", 20) + issue.title + "\n"
- Exclude checks
Line contains tab indentation Open
Open
if idx > limit
- Exclude checks
Line contains tab indentation Open
Open
# console.log "PROJECT ID " + selproj.id
- Exclude checks
Line contains tab indentation Open
Open
reply += rawcode.replace(/^\s*[\r\n]/gm, "")
- Exclude checks
Line contains tab indentation Open
Open
gitlab.projects.all (projects) =>
- Exclude checks
Line contains tab indentation Open
Open
else
- Exclude checks
Line exceeds maximum allowed length Open
Open
reply += "You can add me for your own Gitlab CE projects or Gitlab cloud public projects.\n"
- Exclude checks
Line contains tab indentation Open
Open
reply += "prs for n - list open merge requests for project #n\n"
- Exclude checks
Line contains tab indentation Open
Open
reply += "issue n for m - show issue #n for project #m\n"
- Exclude checks
Line exceeds maximum allowed length Open
Open
# reply += "##{project.id}: #{project.name}, path: #{project.path}, default_branch: #{project.default_branch}, private: #{project.private}, owner: #{project.owner.name} (#{project.owner.email}), date: #{project.created_at}"
- Exclude checks
Line contains tab indentation Open
Open
gitlab.projects.issues.list selproj.id, {'state': 'opened'}, (issues) ->
- Exclude checks
Line contains tab indentation Open
Open
robot.respond /issue (.*) for (.*)/i, (res) ->
- Exclude checks
Line contains tab indentation Open
Open
reply += pad("Issue #" ,20) + issue.iid + "\n"
- Exclude checks
Line contains tab indentation Open
Open
icon = issue.author.avatar_url
- Exclude checks
Line contains tab indentation Open
Open
gitlab.projects.all (projects) =>
- Exclude checks
Line contains tab indentation Open
Open
reply += pad("" + snippet.id , 8) + pad(snippet.author.name,20) + snippet.title + "\n"
- Exclude checks
Line contains tab indentation Open
Open
gitlab.projects.getSnippet {id: selproj.id, sid: snippetid}, (rawcode) ->
- Exclude checks
Line contains tab indentation Open
Open
reply = "```\n"
- Exclude checks