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

release 8.1.1 #60

Merged
merged 1 commit into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .idea/delfino-core.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ Types of changes are:

## [Unreleased]

## [8.1.1] - 2024-09-23

### Fixes

- Don't lowercase branch prefix if coming from configuration or issue tracker.

## [8.1.0] - 2024-09-15

### Features
Expand Down Expand Up @@ -513,7 +519,8 @@ If `tool.delfino.plugins.delfino-core.dockerhub` exists in the `pyproject.toml`:

- Initial source code

[Unreleased]: https://github.com/radeklat/delfino-core/compare/8.1.0...HEAD
[Unreleased]: https://github.com/radeklat/delfino-core/compare/8.1.1...HEAD
[8.1.1]: https://github.com/radeklat/delfino-core/compare/8.1.0...8.1.1
[8.1.0]: https://github.com/radeklat/delfino-core/compare/8.0.0...8.1.0
[8.0.0]: https://github.com/radeklat/delfino-core/compare/7.5.0...8.0.0
[7.5.0]: https://github.com/radeklat/delfino-core/compare/7.4.6...7.5.0
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name="delfino-core"
version="8.1.0"
version="8.1.1"
authors = ["Radek Lát <radek.lat@gmail.com>"]
description="Delfino core plugin"
license = "MIT License"
Expand Down
9 changes: 5 additions & 4 deletions src/delfino_core/vcs_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def consume_args_until_next_option(passed_args: list[str]) -> tuple[str, list[st


def _sanitize_branch_name(branch_name: str) -> str:
return "/".join(_INVALID_BRANCH_NAME_CHARS.sub("_", part).strip("_") for part in branch_name.lower().split("/"))
return "/".join(_INVALID_BRANCH_NAME_CHARS.sub("_", part).strip("_") for part in branch_name.split("/"))


def _get_user_name() -> str:
Expand Down Expand Up @@ -113,7 +113,7 @@ def title_and_branch_prefix_from_issue_tracker(
title = input(f"Enter a title{prompt_part} for the {'PR' if vcs_cli_tool == 'gh' else 'MR'}: ").strip()

if not command_config.issue_tracking.tracker_url:
return title, branch_prefix
return title.lower(), branch_prefix

issue_number = None
try:
Expand All @@ -122,7 +122,8 @@ def title_and_branch_prefix_from_issue_tracker(
pass

if issue_number is not None:
title = JiraClient(command_config.issue_tracking).get_issue_title(issue_number)
branch_prefix = f"{command_config.issue_tracking.issue_prefix}{issue_number}"
issue_title = JiraClient(command_config.issue_tracking).get_issue_title(issue_number).lower()
title = f"{command_config.issue_tracking.issue_prefix}{issue_number}/{issue_title}"
branch_prefix = "" # allow completely custom branch name

return title, branch_prefix
4 changes: 0 additions & 4 deletions tests/unit/test_vcs_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,3 @@ def should_strip_special_characters_from_the_end(input_branch, expected_output):
)
def should_strip_special_characters_around_slash(input_branch, expected_output):
assert _sanitize_branch_name(input_branch) == expected_output

@staticmethod
def should_lower_case_all_characters():
assert _sanitize_branch_name("Feature Branch") == "feature_branch"
Loading