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

PB-579: Fix semver bump type from PR title #37

Merged
merged 4 commits into from
Jun 6, 2024
Merged

PB-579: Fix semver bump type from PR title #37

merged 4 commits into from
Jun 6, 2024

Conversation

ltshb
Copy link
Contributor

@ltshb ltshb commented Jun 6, 2024

If any commit of a PR had a bump type in its commit message, we could not overwrite it using the PR title/body of the PR. This issue has been discovered by this PR geoadmin/service-wmts#86 in which the https://github.com/geoadmin/github-tag-action has a bug an try to do a tag that already exist, and to work around this bug I tried to change the bump type from patch (set by a previous commit message) to minor but this did not work due to this bug.

IMPORTANT: https://github.com/geoadmin/github-tag-action bump type is taken by higher ranking, which means if any commit message inside a PR contains #major, you cannot force the bump type to minor or patch.

ltshb added 3 commits June 5, 2024 17:26
The BitJonny/[email protected] action had an issue with pull_request events,
somehow it returned the last closed PR on the head branch instead of the curren t
PR on the head.

Because the PR infos required are anyway part of the github pull_request event
payload we take it from it now.
If any commit in a PR contains a bump type it was taken instead of the PR
bump type set in title or body. This was due to the fact that geoadmin/github-tag-action
takes bump type from commit message and we were setting the bump type from the
title as default.

So now the PR bump type is set as commit message to the local merge commit that
is used by geoadmin/github-tag-action to compute the future git tag and bump type.
@ltshb ltshb requested review from benschs and rebert June 6, 2024 04:34
Copy link
Contributor

@rebert rebert left a comment

Choose a reason for hiding this comment

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

lgtm. thanks for this fix 💪

@ltshb ltshb merged commit 8f778d3 into master Jun 6, 2024
@ltshb ltshb deleted the develop branch June 6, 2024 07:31
@ltshb ltshb changed the title Fix semver bump type from PR title PB-579: Fix semver bump type from PR title Jun 6, 2024
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.

2 participants