Skip to content

Commit

Permalink
update Dangerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
NQuinn27 committed Mar 19, 2024
1 parent 0e6c25f commit afcc741
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Dangerfile.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ func isConventionalCommitTitle() -> Bool {
pr.title.hasPrefix("feat:")
}

if !isReleasePr && !isConventionalCommitTitle() {
// MARK: - Conventional Commit Title
let validPrefixes = ["fix", "feat", "chore", "ci", "refactor", "docs",
"perf", "test", "build", "revert", "style", "BREAKING CHANGE"]
let isConventionalCommitTitle = validPrefixes.contains { pr.title.hasPrefix($0) }

if !pr.head.ref.hasPrefix("release") && !isConventionalCommitTitle {
fail("Please use a conventional commit title for this PR. See [Conventional Commits and SemVer](https://www.notion.so/primerio/Automating-Version-Bumping-and-Changelog-Creation-c13e32fea11447069dea76f966f4b0fb?pvs=4#c55764aa2f2748eb988d581a456e61e7)")
}

0 comments on commit afcc741

Please sign in to comment.