소스 검색

Fixes #2037 saving autolinks w/ bogus cache props

main
Eric Amodio 2 년 전
부모
커밋
b44249404e
2개의 변경된 파일11개의 추가작업 그리고 1개의 파일을 삭제
  1. +7
    -0
      CHANGELOG.md
  2. +4
    -1
      src/annotations/autolinks.ts

+ 7
- 0
CHANGELOG.md 파일 보기

@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]
## Fixed
- Fixes [#2037](https://github.com/gitkraken/vscode-gitlens/issues/2037) - Autolinks can end up getting saved with invalid (cached) properties
## [12.1.0] - 2022-06-14
## Added
@ -4213,6 +4219,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- Initial release but still heavily a work in progress.
[unreleased]: https://github.com/gitkraken/vscode-gitlens/compare/v12.1.0...HEAD
[12.1.0]: https://github.com/gitkraken/vscode-gitlens/compare/v12.0.7...gitkraken:v12.1.0
[12.0.6]: https://github.com/gitkraken/vscode-gitlens/compare/v12.0.6...gitkraken:v12.0.7
[12.0.6]: https://github.com/gitkraken/vscode-gitlens/compare/v12.0.5...gitkraken:v12.0.6

+ 4
- 1
src/annotations/autolinks.ts 파일 보기

@ -61,7 +61,9 @@ export class Autolinks implements Disposable {
private onConfigurationChanged(e?: ConfigurationChangeEvent) {
if (configuration.changed(e, 'autolinks')) {
this._references = this.container.config.autolinks ?? [];
const autolinks = configuration.get('autolinks');
// Since VS Code's configuration objects are live we need to copy them to avoid writing back to the configuration
this._references = autolinks != null ? autolinks.map(a => ({ ...a })) : [];
}
}
@ -199,6 +201,7 @@ export class Autolinks implements Disposable {
issuesOrPullRequests?: Map<string, IssueOrPullRequest | PromiseCancelledError | undefined>,
): ref is CacheableAutolinkReference | DynamicAutolinkReference {
if (isDynamic(ref)) return true;
if (!ref.prefix || !ref.url) return false;
try {
if (ref.messageMarkdownRegex == null) {

불러오는 중...
취소
저장