我想检索一些"误报"并且"不会修复"一个项目随着时间的推移,所以我使用的是TimeMachine API。
我能够使用以下网址列出"误报",而不是"赢得修复",
api/timemachine/index?metrics=false_positive_issues
但是我没有看到"赢得&#t;修复"在Metric Definitions文档上。
有一个REST服务,GET api / issue_filters / search,允许检索"误报"并且"不会修复",但只针对当前用户。
我有两个问题:
谢谢!
答案 0 :(得分:0)
要使用的指标是" wont_fix_issues"。
示例:
import { Directive, Output, EventEmitter } from '@angular/core';
import { NgForm } from '@angular/forms';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/finally';
import { noop } from 'rxjs/util/noop';
@Directive({
selector: 'form',
exportAs: 'NgFormExtension'
})
export class NgFormExtensionDirective {
private onSubmitBase: ($event: Event) => void;
submitting: boolean;
constructor(private ngForm: NgForm) {
this.onSubmitBase = ngForm.onSubmit;
ngForm.onSubmit = this.onSubmit.bind(this);
}
private onSubmit($event: FormSubmitEvent): boolean {
if (this.submitting || this.ngForm.invalid) {
return false;
}
this.submitting = true;
const result = this.onSubmitBase.call(this.ngForm, $event);
if ($event.submission) {
$event.submission
.finally(() => this.submitting = false)
.subscribe(null, noop);
} else {
this.submitting = false;
}
return result;
}
}
export class FormSubmitEvent extends Event {
submission: Observable<any>;
}
非常感谢 G. Ann - SonarSource团队通过他们的支持小组提供这个答案!