Skip to content

clear-pr-merge-commit-message preserve closing issues on non-default branch - #6122

Merged
yakov116 merged 12 commits into
mainfrom
fix_closing
Nov 1, 2022
Merged

yakov116 merged 12 commits into
mainfrom
fix_closing

Conversation

@yakov116

@yakov116 yakov116 commented Oct 31, 2022 •

Copy link
Copy Markdown
Member

Fixes #4531

Test URLs

refined-github/sandbox#53

Screenshot

image

@yakov116 yakov116 added the bug label Oct 31, 2022
@yakov116
yakov116 requested a review from fregante October 31, 2022 14:05
@yakov116
yakov116 requested a review from fregante November 1, 2022 12:43

const issueNumberElement = keyword.nextElementSibling as HTMLAnchorElement;
const isCrossRepo = getRepo(issueNumberElement)!.nameWithOwner !== getRepo()!.nameWithOwner;
const issueNumber = isCrossRepo ? issueNumberElement.href : issueNumberElement.textContent!;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What if we just get the whole URL? fixes https://GitHub.com/user/repo/issues/123

It works regardless of the repo. I'm not particularly worried about this scenario to be honest because the users who want this specific behavior can just disable the feature and user GitHub's own repo config.

Fixing it is ok, but having a clean fixes #124 isn't worth the complexity here.

@yakov116
yakov116 merged commit 43ef4e5 into main Nov 1, 2022
@yakov116
yakov116 deleted the fix_closing branch November 1, 2022 13:26
fregante added a commit to refined-github/sandbox that referenced this pull request Feb 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

clear-pr-merge-commit-message should preserve which issues a PR closes when it is not merged into the default branch

2 participants