diff --git a/client/cz-component-dash.html b/client/cz-component-dash.html
index bcc6d10..505fb08 100644
--- a/client/cz-component-dash.html
+++ b/client/cz-component-dash.html
@@ -100,7 +100,7 @@
is: "cz-component-dash",
properties: {
- users: {
+ userConfigs: {
type: 'Object',
value: function() { return []; },
},
@@ -112,25 +112,33 @@
type: 'Object',
value: function() { return null; },
},
+ usernames: {
+ type: 'Object',
+ value: function() { return []; },
+ },
component: {
type: 'Object',
value: function() { return {}; }
- }
+ },
},
observers: [
- 'updateComponent(issueList)',
+ 'updateUsernames(userConfigs, issueList)',
+ 'updateComponent(usernames, issueList)',
],
attached: function() {
- registerSource('cz-config', 'users', users => {
- this.set('users', users.map(userData => userData['email']));
+ registerSource('cz-config', 'users', userConfigs => {
+ this.userConfigs = userConfigs;
});
registerSource('cz-config', 'updateSLO', updateSLO => {
- this.set('updateSLO', updateSLO);
+ this.updateSLO = updateSLO;
});
registerSource('cz-config', 'issue-sources', issueSources => {
- this.updateIssueSource(issueSources[this.key]);
+ var issueSource = issueSources[this.key];
+ registerSource(issueSource.tag, issueSource.query, issueList => {
+ this.issueList = issueList;
+ });
});
},
@@ -141,13 +149,14 @@
return issueList.summary(updateSLO);
},
- updateIssueSource: function({tag, query}) {
- registerSource(tag, query, issueList => {
- this.set('issueList', issueList);
- });
+ updateUsernames: function(userConfigs, issueList) {
+ if (!issueList) {
+ return;
+ }
+ this.usernames = userConfigs.map(userConfig => issueList.getUsername(userConfig));
},
- updateComponent: function(issueList) {
+ updateComponent: function(usernames, issueList) {
var team = new IssueList();
var others = new IssueList();
var unowned = new IssueList();
@@ -155,7 +164,7 @@
for (var issue of issueList) {
if (issue.owner == null) {
unowned.push(issue);
- } else if (this.users.indexOf(issue.owner) === -1) {
+ } else if (!usernames.includes(issue.owner)) {
others.push(issue);
} else {
team.push(issue);
diff --git a/client/cz-crbug-issues.html b/client/cz-crbug-issues.html
index 371d2af..4f8c4f8 100644
--- a/client/cz-crbug-issues.html
+++ b/client/cz-crbug-issues.html
@@ -48,7 +48,11 @@
return Crbug.queryURL(query);
}
- return new IssueList(issues, getQueryURL);
+ function getUsername(userConfig) {
+ return userConfig.email;
+ }
+
+ return new IssueList(issues, getQueryURL, getUsername);
},
registerQuery: function(query, callback) {
diff --git a/client/cz-github-issues.html b/client/cz-github-issues.html
new file mode 100644
index 0000000..874f3b2
--- /dev/null
+++ b/client/cz-github-issues.html
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/client/issues-lib.js b/client/issues-lib.js
index ee7201e..87d8bbd 100644
--- a/client/issues-lib.js
+++ b/client/issues-lib.js
@@ -40,6 +40,9 @@ var _reviewLevelMetadata = {
'none (P3)': {
query: {label: 'Pri-3', '-has': 'Update'},
},
+ 'none': {
+ query: {'-has': 'Update'},
+ },
};
var _defaultReviewLevel = 'none';
var _inSLOColor = '#4CAF50'; // Green 500
@@ -53,7 +56,7 @@ class Issue {
summary,
lastUpdatedString,
labels,
- priority: undefined,
+ priority: null,
_lastUpdatedMS: Date.parse(lastUpdatedString),
_reviewLevel: _defaultReviewLevel,
});
@@ -86,7 +89,7 @@ class Issue {
reviewLevelWithBackoff() {
var result = this._reviewLevel;
- if (result == _defaultReviewLevel) {
+ if (result == _defaultReviewLevel && this.priority != null) {
result += ' (P' + this.priority + ')';
}
return result;
@@ -94,20 +97,28 @@ class Issue {
}
class IssueList {
- constructor(issues = [], getQueryURL = null) {
+ constructor(issues = [], getQueryURL = null, getUsername = null) {
for (var issue of issues) {
console.assert(issue instanceof Issue);
}
this._issues = issues;
this._getQueryURL = getQueryURL;
+ this._getUsername = getUsername;
}
getQueryURL(subQuery) {
return this._getQueryURL(subQuery);
}
+ getUsername(userConfig) {
+ return this._getUsername(userConfig);
+ }
+
clone() {
- return new IssueList(this._issues.map(issue => issue.clone()), this._getQueryURL);
+ return new IssueList(
+ this._issues.map(issue => issue.clone()),
+ this._getQueryURL,
+ this._getUsername);
}
push(issue) {
diff --git a/configs/animations-ave.json b/configs/animations-ave.json
index ad9c196..0211cc3 100644
--- a/configs/animations-ave.json
+++ b/configs/animations-ave.json
@@ -19,6 +19,7 @@
"cz-clock-dash",
"cz-component-dash(Blink Animations)",
"cz-issue-priority-dash",
+ "cz-component-dash(Web Animations Polyfill)",
"cz-regression-dash",
"cz-review-latency-dash(false)",
"cz-review-load-dash",
@@ -47,6 +48,10 @@
"Blink Animations": {
"tag": "cz-crbug-issues",
"query": {"component": "Blink>Animation"}
+ },
+ "Web Animations Polyfill": {
+ "tag": "cz-github-issues",
+ "query": {"repo": "web-animations/web-animations-js"}
}
}
}