Skip to content

chore: auto-release only when SwiftPM dependencies are updated#911

Merged
pepicrft merged 1 commit intomainfrom
auto-release-only-when-spm-updates
Mar 14, 2025
Merged

chore: auto-release only when SwiftPM dependencies are updated#911
pepicrft merged 1 commit intomainfrom
auto-release-only-when-spm-updates

Conversation

@pepicrft
Copy link
Copy Markdown
Contributor

I noticed we were creating new releases when dependencies other than SwiftPM's got updated (e.g. Mise dependencies). We should not do this because an update of a Mise dependency has no relation with the XcodeProj package itself.
I'm mimicking the model that we adopted in Command where we configure Renovabebot differently to label PRs based on the package manager, and use the convention in the Git configuration to exclude some commits from the detection logic.

Enhance commit parsing and dependency management:
- Add commit parsers to cliff.toml for better changelog categorization
- Configure semantic commit scopes for dependencies and Swift Package Manager
@pepicrft pepicrft requested review from a team and Copilot March 12, 2025 10:42
@pepicrft pepicrft self-assigned this Mar 12, 2025
@pepicrft pepicrft requested review from asmitbm, danieleformichelli, fortmarek and tuistit and removed request for a team March 12, 2025 10:42
@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Mar 12, 2025
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR aims to ensure that new releases are only triggered when SwiftPM dependencies are updated, avoiding unnecessary releases due to changes in other dependencies.

  • Adds a new commit_parsers section to classify commit messages based on type.
  • Configures skip rules to exclude commits related to non-SwiftPM dependency updates and other chore tasks.

Comment thread cliff.toml
{ message = "^chore\\(pr\\)", skip = true },
{ message = "^chore\\(pull\\)", skip = true },
{ message = "^chore\\(release\\): prepare for", skip = true },
{ message = "^chore|^ci", group = "Miscellaneous Tasks" },
Copy link

Copilot AI Mar 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The regex '^chore|^ci' may not function as intended. Consider grouping the alternatives as '^(chore|ci)' to ensure both options are anchored correctly.

Suggested change
{ message = "^chore|^ci", group = "Miscellaneous Tasks" },
{ message = "^(chore|ci)", group = "Miscellaneous Tasks" },

Copilot uses AI. Check for mistakes.
@dosubot dosubot Bot added the dependencies Pull requests that update a dependency file label Mar 12, 2025
Copy link
Copy Markdown
Member

@fortmarek fortmarek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would love to see added across our repositories. Long-term, we might want to see if we can share bits of cliff.toml, but it might be an overkill given we don't change it that often.

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Mar 13, 2025
@pepicrft
Copy link
Copy Markdown
Contributor Author

would love to see added across our repositories. Long-term, we might want to see if we can share bits of cliff.toml, but it might be an overkill given we don't change it that often.

Yeah... with things like this, I don't know what's best, if having a centralized configuration that we can reuse or live with a bit of inconsistency which we fix over time?

I check git-cliff to see if they support reading the configuration from another repository, and that's not supported.

@pepicrft pepicrft merged commit 95ee036 into main Mar 14, 2025
9 checks passed
@pepicrft pepicrft deleted the auto-release-only-when-spm-updates branch March 14, 2025 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants