Skip to content

Commit

Permalink
dev blocks: render them as out-of-date CRs and QAs
Browse files Browse the repository at this point in the history
Since a dev block may be made by someone QAing or CRing, and will
usually end up requiring further CR and QA by the same people, let's
render a dev block as an out of date CR + QA.

This change counts a block as a CR and QA as far as the leader board is
concerned
  • Loading branch information
danielbeardsley committed Jun 20, 2023
1 parent 35c9ea7 commit d9564f8
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions frontend/src/pull.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ export class Pull extends PullData {
super();
Object.assign(this, data);

const syntheticCRs = this.getSyntheticCRSignatures();
this.cr_signatures = computeSignatures(data.status.allCR.concat(syntheticCRs));
const syntheticCRs = this.getSyntheticSignatures(SignatureType.CR);
const syntheticQAs = this.getSyntheticSignatures(SignatureType.QA);
this.status.allCR = this.status.allCR.concat(syntheticCRs);
this.status.allQA = this.status.allQA.concat(syntheticQAs);
this.cr_signatures = computeSignatures(data.status.allCR);
this.qa_signatures = computeSignatures(data.status.allQA);
}

Expand Down Expand Up @@ -93,14 +96,14 @@ export class Pull extends PullData {
});
}

getSyntheticCRSignatures(): Signature[] {
getSyntheticSignatures(type: SignatureType): Signature[] {
// Treat dev_block sigs as out-of-date CRs in that they hold a place
// in the CR requirements.
return this.status.dev_block.map((devBlock) => {
return {
data: {
...devBlock.data,
type: SignatureType.CR,
type,
active: 0,
}
};
Expand Down

0 comments on commit d9564f8

Please sign in to comment.