Browse Source

Update formatting

master
parent
commit
c786435e0e
No known key found for this signature in database GPG Key ID: DA34C790D267C164
2 changed files with 6 additions and 4 deletions
  1. +3
    -2
      src/issue.cr
  2. +3
    -2
      src/mr.cr

+ 3
- 2
src/issue.cr View File

@@ -12,9 +12,10 @@ struct Issue
)

def formatify
output = "[##{self.iid}](#{self.web_url}) "
project = self.web_url.lchop("https://gitlab.com/").chomp("/issues/#{self.iid}")
output = "#{project}##{self.iid} "
output += "[@#{self.author[:username]}](#{self.author[:web_url]}): "
output += self.title
output += "[#{self.title}](#{self.web_url}) "
output += " **[\\✔]**" if self.state == "closed"
output
end


+ 3
- 2
src/mr.cr View File

@@ -12,9 +12,10 @@ struct MergeRequest
)

def formatify
output = "[!#{self.iid}](#{self.web_url}) "
project = self.web_url.lchop("https://gitlab.com/").chomp("/merge_requests/#{self.iid}")
output = "#{project}!#{self.iid} "
output += "[@#{self.author[:username]}](#{self.author[:web_url]}): "
output += self.title
output += "[#{self.title}](#{self.web_url}) "
output += " **[\\✔]**" if self.state == "closed"
output
end


Loading…
Cancel
Save