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

Fix PR titles made by prepare/publish release workflows #5990

Open
wants to merge 15 commits into
base: V3/develop
Choose a base branch
from

Conversation

BigPeep0doo
Copy link
Contributor

@BigPeep0doo BigPeep0doo commented Feb 14, 2023

Description of the changes

We have added an action in the .github/workflow/prepare_release.yml and .github/workflow/publish_release.yml files to display the PR title with the major and minor version prefix.

Fixes #5766

Have the changes in this PR been tested?

Yes

@BigPeep0doo BigPeep0doo requested a review from Kowlin as a code owner February 14, 2023 13:53
@github-actions github-actions bot added the Category: CI This is related to repository's CI configuration. label Feb 14, 2023
Copy link
Member

@Jackenmen Jackenmen left a comment

Choose a reason for hiding this comment

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

Hi, thanks for taking the interest in improving our automation!

There are some things that need to be addressed before this can be merged:

  • [3.x] prefix should only be added when the PRs are made against 3.x branches
  • I'd rather have a simple script using actions/github-script than use another action such as booxmedialtd/ws-action-parse-semver that you used, especially considering that it's not a widely used action. This should actually make it a lot easier to implement the logic for only adding a prefix when PR is against 3.x branch since it allows you to either return an empty string or appropriate "[3.x] " prefix string and use that in the PR title and the commit message

@Jackenmen Jackenmen added Type: Bug Unexpected behavior, result, or exception. In case of PRs, it is a fix for the foregoing. Changelog Entry: Skipped Changelog entry for this PR is unnecessary. labels Feb 14, 2023
@Jackenmen
Copy link
Member

In case it helps, here's an example of a PR that should have a prefix:

and here's an example of a PR that should not have a prefix:

@BigPeep0doo BigPeep0doo force-pushed the Pr-title branch 5 times, most recently from b4176b0 to 7efa0c5 Compare February 22, 2023 15:49
@Jackenmen
Copy link
Member

I realize that you're currently still working on this but I noticed that you're trying to use the value of new_version which is not what the existence of the prefix depends on. The existence of the prefix depends merely on whether the workflow dispatch was done against a branch starting with 3., the actual version number does not matter here. Since the prefix depends on the branch name, the semver parsing is also unnecessary here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: CI This is related to repository's CI configuration. Changelog Entry: Skipped Changelog entry for this PR is unnecessary. Type: Bug Unexpected behavior, result, or exception. In case of PRs, it is a fix for the foregoing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix PR titles made by prepare/publish release workflows when releasing from 3.x branch
3 participants