Browse Source

Hide confidential issue information

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

+ 6
- 1
src/issue.cr View File

@@ -8,12 +8,17 @@ struct Issue
web_url: String,
iid: Int32,
state: String,
author: NamedTuple(username: String, web_url: String)
author: NamedTuple(username: String, web_url: String),
confidential: Bool
)

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


Loading…
Cancel
Save