Skip to content
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
1 change: 1 addition & 0 deletions ddev/changelog.d/24868.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Include the target branch in backport PR titles (`[Backport <branch>] <subject>`).
2 changes: 1 addition & 1 deletion ddev/src/ddev/cli/release/port_commit_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ def build_port_plan(
target_branch=target_branch,
new_branch=new_branch,
worktree_path=_worktree_path_for(app, new_branch),
pr_title=f'[Backport] {clean_subject}',
pr_title=f'[Backport {target_branch}] {clean_subject}',

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Update the CLI help to match the generated title

When users run ddev release port-commit --help, the command still promises a PR titled [Backport] <subject> in port_commit.py:59, while this now generates [Backport <target-branch>] <subject>. Update that docstring so the documented user-visible behavior matches the PR that is actually created.

Useful? React with 👍 / 👎.

pr_body=build_pr_body(
app,
sha=full_sha,
Expand Down
6 changes: 4 additions & 2 deletions ddev/tests/cli/release/test_port_commit.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ def test_command_happy_path(ddev: CliRunner, mocker: MockerFixture, fake_async_g
pr_call = fake_async_github.last_call('create_pull_request')
assert pr_call.kwargs['owner'] == 'DataDog'
assert pr_call.kwargs['repo'] == 'integrations-core'
assert pr_call.kwargs['title'] == '[Backport] Fix bug'
assert pr_call.kwargs['title'] == '[Backport master] Fix bug'
assert pr_call.kwargs['head'] == 'alice/port-1234567890-to-master'
assert pr_call.kwargs['base'] == 'master'
assert pr_call.kwargs['draft'] is False
Expand Down Expand Up @@ -792,7 +792,7 @@ def capture_side_effect(*args):
'create_pull_request',
owner='DataDog',
repo='integrations-core',
title='[Backport] Fix bug',
title='[Backport master] Fix bug',
head=f'alice/port-{commit_sha[:10]}-to-master',
base='master',
body=mocker.ANY,
Expand Down Expand Up @@ -1086,6 +1086,8 @@ def test_command_from_pr_ports_every_backport_label(
assert bases == ['7.62.x', '7.61.x']
heads = [c.kwargs['head'] for c in fake_async_github.calls_to('create_pull_request')]
assert heads == ['alice/port-1234567890-to-7.62.x', 'alice/port-1234567890-to-7.61.x']
titles = [c.kwargs['title'] for c in fake_async_github.calls_to('create_pull_request')]
assert titles == ['[Backport 7.62.x] Fix bug', '[Backport 7.61.x] Fix bug']


def test_command_from_pr_explicit_target_restricts_to_one_base(
Expand Down
Loading