Skip to content

Commit

Permalink
Disable semantic commits from Renovate (#3629)
Browse files Browse the repository at this point in the history
* Disable semantic commits from Renovate

* Add a Danger check for semantic commits.
  • Loading branch information
pixlwave authored Dec 17, 2024
1 parent 598e604 commit a16f169
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Dangerfile.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ if hasPngs {
}

// Check for nice PR titles
let prTitle = danger.github.pullRequest.title
let fixesRegex = try! Regex("(Fixes|Fix) #\\d+")
if danger.github.pullRequest.title.hasSuffix("") || danger.github.pullRequest.title.starts(with: fixesRegex) {
let semanticRegex = try! Regex("\\w+\\(\\w+\\):")
if prTitle.hasSuffix("") || prTitle.starts(with: fixesRegex) || prTitle.starts(with: semanticRegex) {
fail("Please provide a complete title that can be used as a changelog entry.")
}

Expand Down
3 changes: 2 additions & 1 deletion renovate.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended"
"config:recommended",
":semanticCommitsDisabled"
],
"labels" : [
"pr-misc"
Expand Down

0 comments on commit a16f169

Please sign in to comment.