-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Improves overview branch autolinks #3957
base: main
Are you sure you want to change the base?
Improves overview branch autolinks #3957
Conversation
- skip redirected PR autolinks if the refset is non-prefixed - filter autolinks by type=issue before render in the issues section - add unlink feature
// we consider that all non-prefixed links are came from branch names and linked to issues | ||
// skip if it's a PR link | ||
if (!link.prefix) { | ||
issueOrPullRequestPromise = issueOrPullRequestPromise?.then(x => | ||
x?.type === 'pullrequest' ? undefined : x, | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain what "non-prefixed" means a bit so I can understand?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
non-prefixed refset is required to parse branch name autolinks and mean that we're trying to search issue keys in any numbers with no prefixes. For example, we can search issues with prefixes #
or gh
for github in commit messages, but for the branch names the issue keys can be non-prefixed - just numbers. like in current branch name
bugs/3956-pr-autolinks-are-rendered-in-issues-section
- the issue key is just a number without any prefixes
const item = | ||
skipPrompt ?? | ||
(await window.showWarningMessage( | ||
`This action will unlink the issue ${issue.url} from the branch ${reference.name} forever`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a fan of something that cannot be undone like this. I think we need a broader discussion on how we want to handle issue association and dissociation and how autolinks fit into that mix, in a way that prevents anyone from getting stuck into a state they cannot easily back out from.
@@ -67,6 +67,14 @@ export interface GetOverviewRequest { | |||
[key: string]: unknown; | |||
} | |||
|
|||
export interface OverviewBranchIssue { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is an "overview branch"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's an item on the overview section. I have no idea how to call this omitted issue interface
Description
Screen.Recording.2025-01-20.at.16.04.40.mov
Checklist
Fixes $XXX -
orCloses #XXX -
prefix to auto-close the issue that your PR addresses