Skip to content

Commit 4a398dc

Browse files
committed
Dangerfile: add check for branch naming.
1 parent 65ee22c commit 4a398dc

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Dangerfile

+7
Original file line numberDiff line numberDiff line change
@@ -686,6 +686,13 @@ if commits > 1
686686
end
687687
end
688688

689+
if github.branch_for_head !~ /^gh[0-9]+_/
690+
warn("danger check: branch '#{github.branch_for_head}' does not comply with our best practices.\n"\
691+
"Branch name should use the following scheme: `ghXXX_meaningful-name` where `XXX` is an issue number.\n"\
692+
"Next time, please, use this scheme :)"
693+
)
694+
end
695+
689696
all_checks_passed = violation_report[:errors].empty? && violation_report[:warnings].empty? && violation_report[:messages].empty?
690697
if all_checks_passed
691698
message(

0 commit comments

Comments
 (0)