File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44
55The format is based on [ Keep a Changelog] ( http://keepachangelog.com/ ) and this project adheres to [ Semantic Versioning] ( http://semver.org/ ) .
66
7+ ## [ Unreleased]
8+
9+ ## Fixed
10+
11+ - Fixes [ #2037 ] ( https://github.com/gitkraken/vscode-gitlens/issues/2037 ) - Autolinks can end up getting saved with invalid (cached) properties
12+
713## [ 12.1.0] - 2022-06-14
814
915## Added
@@ -4213,6 +4219,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
42134219
42144220- Initial release but still heavily a work in progress.
42154221
4222+ [ unreleased ] : https://github.com/gitkraken/vscode-gitlens/compare/v12.1.0...HEAD
42164223[ 12.1.0 ] : https://github.com/gitkraken/vscode-gitlens/compare/v12.0.7...gitkraken:v12.1.0
42174224[ 12.0.6 ] : https://github.com/gitkraken/vscode-gitlens/compare/v12.0.6...gitkraken:v12.0.7
42184225[ 12.0.6 ] : https://github.com/gitkraken/vscode-gitlens/compare/v12.0.5...gitkraken:v12.0.6
Original file line number Diff line number Diff line change @@ -61,7 +61,9 @@ export class Autolinks implements Disposable {
6161
6262 private onConfigurationChanged ( e ?: ConfigurationChangeEvent ) {
6363 if ( configuration . changed ( e , 'autolinks' ) ) {
64- this . _references = this . container . config . autolinks ?? [ ] ;
64+ const autolinks = configuration . get ( 'autolinks' ) ;
65+ // Since VS Code's configuration objects are live we need to copy them to avoid writing back to the configuration
66+ this . _references = autolinks != null ? autolinks . map ( a => ( { ...a } ) ) : [ ] ;
6567 }
6668 }
6769
@@ -199,6 +201,7 @@ export class Autolinks implements Disposable {
199201 issuesOrPullRequests ?: Map < string , IssueOrPullRequest | PromiseCancelledError | undefined > ,
200202 ) : ref is CacheableAutolinkReference | DynamicAutolinkReference {
201203 if ( isDynamic ( ref ) ) return true ;
204+ if ( ! ref . prefix || ! ref . url ) return false ;
202205
203206 try {
204207 if ( ref . messageMarkdownRegex == null ) {
You can’t perform that action at this time.
0 commit comments