Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Customise prefix for commit messages created by dependabot #79

Merged
merged 3 commits into from
Jan 4, 2024

Conversation

sebastianczech
Copy link
Contributor

@sebastianczech sebastianczech commented Jan 3, 2024

Description

PR customises commit messages created by dependabot while updating github-actions.

Motivation and Context

In #73 title was manually changed in order to trigger release, in #78 there was no change of title and no release was triggered. For future to avoid manual step we can:

In PR second solution was chosen, because it allows in future to add commits with chore prefix, which are not changing anything in code and should not trigger release.

By purpose invalid prefix CHANGEME is configured in order to put correct one - if there are breaking changes, then new minor version should be created, but if there are no breaking changes, then only patch version is required.

How Has This Been Tested?

Code will be tested next time dependabot creates PR.

If that change will work correctly, later it can be applied for other repositories:

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist

  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes if appropriate.
  • All new and existing tests passed.

@sebastianczech sebastianczech requested review from a team as code owners January 3, 2024 13:42
Copy link
Contributor

@FoSix FoSix left a comment

Choose a reason for hiding this comment

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

@sebastianczech maybe it would be good to change this from feat to chore or ci. It's not a change to the code, so no need for a new release

@sebastianczech
Copy link
Contributor Author

sebastianczech commented Jan 3, 2024

@sebastianczech maybe it would be good to change this from feat to chore or ci. It's not a change to the code, so no need for a new release

@FoSix I added by purpose feat because I wanted also trigger release for changes from #78 , #77 and #75. Currently we don't have release with changes from that 3 PRs. Can I leave it as it is ?

@michalbil
Copy link
Contributor

I'd opt to use a different prefix than "fix" - dependency update is not really one.

@pimielowski
Copy link

I also believe that chore fit better here.

@sebastianczech
Copy link
Contributor Author

sebastianczech commented Jan 4, 2024

@michalbil please propose other prefix, which we can use.

@pimielowski as we talked internally, if we use chore, then without changing release rules we will not have new release built.

For repository terraform-modules-vmseries-ci-workflows if we update some GitHub action (like tj-actions/changed-files) we need to create new release - this release package is used in workflows for VM-Series modules e.g. terraform-aws-vmseries-modules e.g.: https://github.com/PaloAltoNetworks/terraform-aws-vmseries-modules/blob/5fbca48d51b5bf8817c02623a7a1129679ac1839/.github/workflows/pr_ci.yml#L25

For other repositories like terraform-aws-vmseries-modules we have dependabot only for Python packages (so only pre-commit currently), so release is not required when we update dependencies.

Personally I preferred option 1 option from PR description (do release with commit containing prefix chore - it can be achieved by changing release rules according to https://github.com/semantic-release/commit-analyzer?tab=readme-ov-file#releaserules), but after consulting this subject with @FoSix , option 2 was selected (change prefix added by dependabot - it can be done by adding prefix to dependabot.yml file according to https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#commit-message)

@sebastianczech sebastianczech changed the title feat: Customise prefix for commit messages created by dependabot CHANGEME: Customise prefix for commit messages created by dependabot Jan 4, 2024
@sebastianczech sebastianczech changed the title CHANGEME: Customise prefix for commit messages created by dependabot feat: Customise prefix for commit messages created by dependabot Jan 4, 2024
@sebastianczech sebastianczech merged commit cc2824a into main Jan 4, 2024
6 of 7 checks passed
@sebastianczech sebastianczech deleted the dependabot-commit-prefix branch January 4, 2024 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants