Skip to content

Commit 0de5c44

Browse files
authored
Remove links from code change blocks in PRs (#486)
* remove links * version bump
1 parent b5f3c92 commit 0de5c44

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

patchwork/steps/PR/typed.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ class PRInputs(__PRInputsRequired, total=False):
2222
force_pr_creation: Annotated[bool, StepTypeConfig(is_config=True)]
2323
disable_pr: Annotated[bool, StepTypeConfig(is_config=True)]
2424
scm_url: Annotated[str, StepTypeConfig(is_config=True)]
25-
gitlab_api_key: Annotated[str, StepTypeConfig(is_config=True, or_op=["github_api_key"])]
26-
github_api_key: Annotated[str, StepTypeConfig(is_config=True, or_op=["gitlab_api_key"])]
25+
gitlab_api_key: Annotated[str, StepTypeConfig(is_config=True)]
26+
github_api_key: Annotated[str, StepTypeConfig(is_config=True)]
2727

2828

2929
class PROutputs(TypedDict):

patchwork/steps/PreparePR/PreparePR.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,24 +42,25 @@ def run(self) -> dict:
4242
continue
4343

4444
placeholder_inner_text = path
45-
if start_line is not None and end_line is not None:
46-
placeholder_inner_text = f"{path}:{start_line+1}:{end_line}"
47-
chunk_link = "{{" + placeholder_inner_text + "}}"
45+
# TODO: consider dealing with line numbers exceeding diff chunk
46+
# if start_line is not None and end_line is not None:
47+
# placeholder_inner_text = f"{path}:{start_line+1}:{end_line}"
48+
# chunk_link = "{{" + placeholder_inner_text + "}}"
4849

4950
if title != "" and patch_msg == "":
5051
expandable = f"\n {title.strip()}"
5152
elif title == "" and patch_msg != "":
5253
expandable = (
5354
f"<details>"
54-
f"<summary>[{placeholder_inner_text}]({chunk_link})</summary>"
55+
f"<summary>{placeholder_inner_text}</summary>"
5556
f"{indent(patch_msg.strip(), ' ')}"
5657
f"</details>"
5758
)
5859
else:
5960
# when both title and patch_msg are present
6061
expandable = (
6162
f"<details>"
62-
f"<summary>[{title.strip()}]({chunk_link})</summary>"
63+
f"<summary>{title.strip()}</summary>"
6364
f"{indent(patch_msg.strip(), ' ')}"
6465
f"</details>"
6566
)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "patchwork-cli"
3-
version = "0.0.38"
3+
version = "0.0.39"
44
description = ""
55
authors = ["patched.codes"]
66
license = "AGPL"

0 commit comments

Comments
 (0)