Skip to content

Commit 33b11a1

Browse files
committed
Fix SlackNotifier url and audit results rule name
1 parent e20ce0a commit 33b11a1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/slack_notifier.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ def initialize(webhook, project_id, commit_hash, audit_result)
1111

1212
def notify
1313
notifier = Slack::Notifier.new @webhook
14-
notifier.ping "Commit hash [#{@commit_hash}](https://#{@project_name}/commit/#{@commit_hash}) of the project #{@project_name} has been detected to violate the following:\n#{rule_name}\n"
14+
notifier.ping "Commit hash [#{@commit_hash}](https://github.com/#{@project_name}/commit/#{@commit_hash}) of the project #{@project_name} has been detected to violate the following:\n#{rule_name}\n"
1515
end
1616

1717
private
1818

1919
def rule_name
20-
return @audit_result['rule_name'] if @audit_result.key?('rule_name')
20+
return @audit_result[:rule_name] if @audit_result[:rule_name]
2121
'Unknown rule/Improper audit result object returned.'
2222
end
2323
end

0 commit comments

Comments
 (0)