Add jsdoc
This is some perfunctory jsdoc headers on functions to keep the Gerrit
3.2 build happy. It is unclear exactly why this is required; see
https://bugs.chromium.org/p/gerrit/issues/detail?id=13834
Change-Id: I2770e167f108c3f258c1eb524c716d19af975b89
diff --git a/zuul-results-summary/zuul-results-summary.js b/zuul-results-summary/zuul-results-summary.js
index 48e68fd..9e3f687 100644
--- a/zuul-results-summary/zuul-results-summary.js
+++ b/zuul-results-summary/zuul-results-summary.js
@@ -20,6 +20,10 @@
* Tab contents
*/
class ZuulSummaryStatusTab extends Polymer.Element {
+
+ /** Get properties
+ * @returns {dict} change and revision
+ */
static get properties() {
return {
change: Object,
@@ -27,6 +31,9 @@
};
}
+ /** Get template
+ * @returns {Polymer.html} the template
+ */
static get template() {
return Polymer.html`
<style>
@@ -96,11 +103,19 @@
</template>`;
}
+ /** Look for Zuul tag in message
+ * @param{ChangeMessageInfo} message
+ * @returns {bool} if this is a Zuul message or not
+ */
_match_message_via_tag(message) {
return (message.tag &&
message.tag.startsWith('autogenerated:zuul')) ? true : false;
}
+ /** Look for 3rd-party CI messages via regex
+ * @param{ChangeMessageInfo} message
+ * @returns {bool} if this is a Zuul-ish message or not
+ */
_match_message_via_regex(message) {
// TODO: allow this to be passed in via config
const authorRe = /^(?<author>.* CI|Zuul)/;
@@ -108,6 +123,10 @@
return author ? true : false;
}
+ /** Extract the status and pipeline from the message
+ * @param{ChangeMessageInfo} message
+ * @returns {list} status and pipeline
+ */
_get_status_and_pipeline(message) {
// Look for the full Zuul-3ish build status message, e.g.:
// Build succeeded (check pipeline).
@@ -129,6 +148,7 @@
return [status, pipeline];
}
+ /** ready function */
ready() {
super.ready();
@@ -244,9 +264,13 @@
* Tab Header Element
*/
class ZuulSummaryStatusTabHeader extends Polymer.Element {
- static get template() {
- return Polymer.html`Zuul Summary`;
- }
+
+ /** Get template
+ * @returns {Polymer.html} the template
+ */
+ static get template() {
+ return Polymer.html`Zuul Summary`;
+ }
}
customElements.define('zuul-summary-status-tab-header',