Add a report on external review status (#3819)
|
@ -22,7 +22,12 @@ from google.cloud import ndb # type: ignore
|
|||
import settings
|
||||
from internals import approval_defs, slo
|
||||
from internals.core_enums import *
|
||||
from internals.core_models import FeatureEntry, MilestoneSet, Stage
|
||||
from internals.core_models import (
|
||||
FeatureEntry,
|
||||
MilestoneSet,
|
||||
ReviewResultProperty,
|
||||
Stage,
|
||||
)
|
||||
from internals.data_types import FeatureDictInnerViewInfo, StageDict, VerboseFeatureDict
|
||||
from internals.review_models import Gate, Vote
|
||||
|
||||
|
@ -264,6 +269,7 @@ def _format_new_crbug_url(blink_components: Optional[list[str]],
|
|||
|
||||
|
||||
_COMPUTED_VIEWS_TO_ENUM = {
|
||||
ReviewResultProperty.CLOSED_WITHOUT_POSITION: NO_PUBLIC_SIGNALS,
|
||||
'defer': GECKO_DEFER,
|
||||
'negative': OPPOSED,
|
||||
'neutral': NEUTRAL,
|
||||
|
@ -284,7 +290,11 @@ def _compute_vendor_views(
|
|||
'val': NO_PUBLIC_SIGNALS,
|
||||
}
|
||||
if computed_views and form_views not in [SHIPPED, IN_DEV]:
|
||||
result['text'] = computed_views.title()
|
||||
result['text'] = (
|
||||
'Closed Without a Position'
|
||||
if computed_views == ReviewResultProperty.CLOSED_WITHOUT_POSITION
|
||||
else computed_views.title()
|
||||
)
|
||||
result['val'] = _COMPUTED_VIEWS_TO_ENUM.get(
|
||||
computed_views, form_views if form_views in VENDOR_VIEWS else NO_PUBLIC_SIGNALS
|
||||
)
|
||||
|
|
|
@ -0,0 +1,269 @@
|
|||
# Copyright 2024 Google Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License")
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
|
||||
import math
|
||||
import re
|
||||
from enum import StrEnum
|
||||
from typing import Literal
|
||||
|
||||
from chromestatus_openapi.models.external_reviews_response import (
|
||||
ExternalReviewsResponse,
|
||||
)
|
||||
from chromestatus_openapi.models.feature_link import FeatureLink
|
||||
from chromestatus_openapi.models.link_preview import LinkPreview
|
||||
from chromestatus_openapi.models.outstanding_review import OutstandingReview
|
||||
from google.cloud import ndb # type: ignore
|
||||
|
||||
from framework import basehandlers
|
||||
from internals.core_enums import (
|
||||
ENABLED_BY_DEFAULT,
|
||||
STAGE_BLINK_DEV_TRIAL,
|
||||
STAGE_BLINK_EVAL_READINESS,
|
||||
STAGE_BLINK_EXTEND_ORIGIN_TRIAL,
|
||||
STAGE_BLINK_INCUBATE,
|
||||
STAGE_BLINK_ORIGIN_TRIAL,
|
||||
STAGE_BLINK_PROTOTYPE,
|
||||
STAGE_BLINK_SHIPPING,
|
||||
STAGE_DEP_DEPRECATION_TRIAL,
|
||||
STAGE_DEP_DEV_TRIAL,
|
||||
STAGE_DEP_EXTEND_DEPRECATION_TRIAL,
|
||||
STAGE_DEP_PLAN,
|
||||
STAGE_DEP_REMOVE_CODE,
|
||||
STAGE_DEP_SHIPPING,
|
||||
STAGE_ENT_ROLLOUT,
|
||||
STAGE_ENT_SHIPPED,
|
||||
STAGE_FAST_DEV_TRIAL,
|
||||
STAGE_FAST_EXTEND_ORIGIN_TRIAL,
|
||||
STAGE_FAST_ORIGIN_TRIAL,
|
||||
STAGE_FAST_PROTOTYPE,
|
||||
STAGE_FAST_SHIPPING,
|
||||
STAGE_PSA_DEV_TRIAL,
|
||||
STAGE_PSA_IMPLEMENT,
|
||||
STAGE_PSA_SHIPPING,
|
||||
)
|
||||
from internals.core_models import FeatureEntry, Stage
|
||||
from internals.feature_links import (
|
||||
get_by_feature_ids as get_feature_links_by_feature_ids,
|
||||
)
|
||||
from internals.link_helpers import (
|
||||
GECKO_REVIEW_URL_PATTERN,
|
||||
TAG_REVIEW_URL_PATTERN,
|
||||
WEBKIT_REVIEW_URL_PATTERN,
|
||||
)
|
||||
|
||||
|
||||
class StageType(StrEnum):
|
||||
INCUBATING = 'incubating'
|
||||
PROTOTYPING = 'prototyping'
|
||||
DEV_TRIAL = 'dev-trial'
|
||||
WIDE_REVIEW = 'wide-review'
|
||||
ORIGIN_TRIAL = 'origin-trial'
|
||||
SHIPPING = 'shipping'
|
||||
SHIPPED = 'shipped'
|
||||
|
||||
|
||||
STAGE_TYPES: dict[int, StageType] = {
|
||||
STAGE_BLINK_INCUBATE: StageType.INCUBATING,
|
||||
STAGE_BLINK_PROTOTYPE: StageType.PROTOTYPING,
|
||||
STAGE_BLINK_DEV_TRIAL: StageType.DEV_TRIAL,
|
||||
STAGE_BLINK_EVAL_READINESS: StageType.WIDE_REVIEW,
|
||||
STAGE_BLINK_ORIGIN_TRIAL: StageType.ORIGIN_TRIAL,
|
||||
STAGE_BLINK_EXTEND_ORIGIN_TRIAL: StageType.ORIGIN_TRIAL,
|
||||
STAGE_BLINK_SHIPPING: StageType.SHIPPING,
|
||||
STAGE_FAST_PROTOTYPE: StageType.PROTOTYPING,
|
||||
STAGE_FAST_DEV_TRIAL: StageType.DEV_TRIAL,
|
||||
STAGE_FAST_ORIGIN_TRIAL: StageType.ORIGIN_TRIAL,
|
||||
STAGE_FAST_EXTEND_ORIGIN_TRIAL: StageType.ORIGIN_TRIAL,
|
||||
STAGE_FAST_SHIPPING: StageType.SHIPPING,
|
||||
STAGE_PSA_IMPLEMENT: StageType.WIDE_REVIEW,
|
||||
STAGE_PSA_DEV_TRIAL: StageType.DEV_TRIAL,
|
||||
STAGE_PSA_SHIPPING: StageType.SHIPPING,
|
||||
STAGE_DEP_PLAN: StageType.INCUBATING,
|
||||
STAGE_DEP_DEV_TRIAL: StageType.DEV_TRIAL,
|
||||
STAGE_DEP_SHIPPING: StageType.SHIPPING,
|
||||
STAGE_DEP_DEPRECATION_TRIAL: StageType.SHIPPED,
|
||||
STAGE_DEP_EXTEND_DEPRECATION_TRIAL: StageType.SHIPPED,
|
||||
STAGE_DEP_REMOVE_CODE: StageType.SHIPPED,
|
||||
STAGE_ENT_ROLLOUT: StageType.SHIPPED,
|
||||
STAGE_ENT_SHIPPED: StageType.SHIPPED,
|
||||
}
|
||||
|
||||
|
||||
def stage_type(feature: FeatureEntry, stage: Stage | None) -> StageType:
|
||||
if stage is None:
|
||||
return StageType.INCUBATING
|
||||
|
||||
tentative_type = STAGE_TYPES[stage.stage_type]
|
||||
if (
|
||||
tentative_type == StageType.SHIPPING
|
||||
and feature.impl_status_chrome == ENABLED_BY_DEFAULT
|
||||
):
|
||||
return StageType.SHIPPED
|
||||
return tentative_type
|
||||
|
||||
|
||||
def min_of_present(*args):
|
||||
present_args = [arg for arg in args if arg is not None]
|
||||
if len(present_args) == 0:
|
||||
return None
|
||||
return min(present_args)
|
||||
|
||||
|
||||
def max_of_present(*args):
|
||||
present_args = [arg for arg in args if arg is not None]
|
||||
if len(present_args) == 0:
|
||||
return None
|
||||
return max(present_args)
|
||||
|
||||
|
||||
class ExternalReviewerInfo:
|
||||
unreviewed_features_query: ndb.Query
|
||||
"""Fetch this to get features for which this group has been asked for a review, and they haven't
|
||||
finished it yet."""
|
||||
|
||||
_review_link: str
|
||||
"""The name of the field in FeatureEntry that holds the review link for review_group."""
|
||||
|
||||
review_pattern: re.Pattern
|
||||
"""Matches URLs in the reviewer's review repository."""
|
||||
|
||||
group_name: str
|
||||
"""The name used for this group inside Chrome Status."""
|
||||
|
||||
def __init__(self, group_name: Literal['tag', 'gecko', 'webkit']):
|
||||
self.group_name = group_name
|
||||
if group_name == 'tag':
|
||||
self.unreviewed_features_query = FeatureEntry.query(
|
||||
FeatureEntry.has_open_tag_review == True # noqa: E712
|
||||
)
|
||||
self._review_link = 'tag_review'
|
||||
self.review_pattern = TAG_REVIEW_URL_PATTERN
|
||||
elif group_name == 'gecko':
|
||||
self.unreviewed_features_query = FeatureEntry.query(
|
||||
FeatureEntry.has_open_ff_review == True # noqa: E712
|
||||
)
|
||||
self._review_link = 'ff_views_link'
|
||||
self.review_pattern = GECKO_REVIEW_URL_PATTERN
|
||||
elif group_name == 'webkit':
|
||||
self.unreviewed_features_query = FeatureEntry.query(
|
||||
FeatureEntry.has_open_safari_review == True # noqa: E712
|
||||
)
|
||||
self._review_link = 'safari_views_link'
|
||||
self.review_pattern = WEBKIT_REVIEW_URL_PATTERN
|
||||
else:
|
||||
raise TypeError(f'Invalid group name {group_name!r}')
|
||||
|
||||
def review_link(self, feature: FeatureEntry) -> str:
|
||||
"""The link to this reviewer's review of `feature`."""
|
||||
return getattr(feature, self._review_link)
|
||||
|
||||
|
||||
class ExternalReviewsAPI(basehandlers.APIHandler):
|
||||
"""Implements the OpenAPI /external_reviews path."""
|
||||
|
||||
def do_get(self, **kwargs):
|
||||
"""Get a list of features with outstanding external reviews from a particular review body.
|
||||
"""
|
||||
review_group: str | None = kwargs.get('review_group', None)
|
||||
if review_group not in ['tag', 'gecko', 'webkit']:
|
||||
self.abort(404, f'invalid review group {review_group}')
|
||||
|
||||
reviewer_info = ExternalReviewerInfo(review_group)
|
||||
unreviewed_features = reviewer_info.unreviewed_features_query.fetch()
|
||||
|
||||
# Remove features for which the review link isn't a request for the review group to review the
|
||||
# feature.
|
||||
unreviewed_features = [
|
||||
feature
|
||||
for feature in unreviewed_features
|
||||
if reviewer_info.review_pattern.search(reviewer_info.review_link(feature))
|
||||
]
|
||||
|
||||
# Build a map from each feature ID to its active Stage information.
|
||||
active_stage = {
|
||||
stage.feature_id: stage
|
||||
for stage in ndb.get_multi(
|
||||
[
|
||||
ndb.Key('Stage', feature.active_stage_id)
|
||||
for feature in unreviewed_features
|
||||
if feature.active_stage_id
|
||||
]
|
||||
)
|
||||
if stage
|
||||
}
|
||||
|
||||
# Filter to reviews for which we could fetch a preview.
|
||||
feature_links, _has_stale_links = get_feature_links_by_feature_ids(
|
||||
[feature.key.id() for feature in unreviewed_features], update_stale_links=True
|
||||
)
|
||||
review_links = {
|
||||
reviewer_info.review_link(feature) for feature in unreviewed_features
|
||||
}
|
||||
previewable_urls = {fl['url'] for fl in feature_links}
|
||||
|
||||
# Build the response objects.
|
||||
reviews = [
|
||||
OutstandingReview(
|
||||
review_link=reviewer_info.review_link(feature),
|
||||
feature=FeatureLink(id=feature.key.id(), name=feature.name),
|
||||
current_stage=stage_type(feature, stage),
|
||||
estimated_start_milestone=min_of_present(
|
||||
stage.milestones.desktop_first,
|
||||
stage.milestones.android_first,
|
||||
stage.milestones.ios_first,
|
||||
stage.milestones.webview_first,
|
||||
)
|
||||
if stage and stage.milestones
|
||||
else None,
|
||||
estimated_end_milestone=max_of_present(
|
||||
stage.milestones.desktop_last,
|
||||
stage.milestones.android_last,
|
||||
stage.milestones.ios_last,
|
||||
stage.milestones.webview_last,
|
||||
)
|
||||
if stage and stage.milestones
|
||||
else None,
|
||||
)
|
||||
for feature in unreviewed_features
|
||||
for stage in [active_stage.get(feature.key.id(), None)]
|
||||
if reviewer_info.review_link(feature) in previewable_urls
|
||||
]
|
||||
reviews.sort(
|
||||
key=lambda review: (
|
||||
review.current_stage,
|
||||
review.estimated_end_milestone
|
||||
if review.estimated_end_milestone is not None
|
||||
else math.inf,
|
||||
review.estimated_start_milestone
|
||||
if review.estimated_start_milestone is not None
|
||||
else math.inf,
|
||||
review.review_link,
|
||||
)
|
||||
)
|
||||
|
||||
link_previews = [
|
||||
LinkPreview(
|
||||
url=feature_link['url'],
|
||||
type=feature_link['type'],
|
||||
information=feature_link['information'],
|
||||
http_error_code=feature_link['http_error_code'],
|
||||
)
|
||||
for feature_link in feature_links
|
||||
if feature_link['url'] in review_links
|
||||
]
|
||||
link_previews.sort(key=lambda link: link.url)
|
||||
|
||||
result = ExternalReviewsResponse(reviews=reviews, link_previews=link_previews)
|
||||
return result.to_dict()
|
|
@ -0,0 +1,560 @@
|
|||
# Copyright 2024 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import testing_config # isort: split
|
||||
|
||||
import json
|
||||
import logging
|
||||
import os.path
|
||||
import re
|
||||
from typing import NotRequired, TypedDict
|
||||
from unittest import mock
|
||||
|
||||
import flask
|
||||
from google.cloud import ndb # type: ignore
|
||||
|
||||
from api import external_reviews_api
|
||||
from api.api_specs import MILESTONESET_FIELD_DATA_TYPES
|
||||
from api.features_api import FeaturesAPI
|
||||
from internals.core_enums import (
|
||||
ENABLED_BY_DEFAULT,
|
||||
FEATURE_TYPE_EXISTING_ID,
|
||||
FEATURE_TYPE_INCUBATE_ID,
|
||||
IN_DEV,
|
||||
IN_DEVELOPMENT,
|
||||
MISC,
|
||||
NEUTRAL,
|
||||
NO_PUBLIC_SIGNALS,
|
||||
PROPOSED,
|
||||
SHIPPED,
|
||||
SIGNALS_NA,
|
||||
STAGE_BLINK_DEV_TRIAL,
|
||||
STAGE_BLINK_ORIGIN_TRIAL,
|
||||
STAGE_BLINK_PROTOTYPE,
|
||||
STAGE_FAST_SHIPPING,
|
||||
UNSET_STD,
|
||||
)
|
||||
from internals.core_models import FeatureEntry, MilestoneSet, Stage
|
||||
from internals.feature_links import FeatureLinks
|
||||
from internals.link_helpers import LINK_TYPE_GITHUB_ISSUE, Link
|
||||
from internals.review_models import Gate
|
||||
from internals.user_models import AppUser
|
||||
|
||||
test_app = flask.Flask(__name__)
|
||||
|
||||
|
||||
def make_feature(
|
||||
name: str,
|
||||
active_stage: int,
|
||||
tag: str | None = None,
|
||||
webkit: str | None = None,
|
||||
gecko: str | None = None,
|
||||
milestones: MilestoneSet = MilestoneSet(),
|
||||
) -> FeatureEntry:
|
||||
fe = FeatureEntry(
|
||||
name=name,
|
||||
category=1,
|
||||
summary='Summary',
|
||||
tag_review=tag,
|
||||
tag_review_resolution=None,
|
||||
ff_views_link=gecko,
|
||||
ff_views_link_result=None,
|
||||
safari_views_link=webkit,
|
||||
safari_views_link_result=None,
|
||||
)
|
||||
fe.put()
|
||||
fe_id = fe.key.integer_id()
|
||||
stage = Stage(feature_id=fe_id, stage_type=active_stage, milestones=milestones)
|
||||
stage.put()
|
||||
fe.active_stage_id = stage.key.id()
|
||||
fe.put()
|
||||
if tag:
|
||||
fl = FeatureLinks(
|
||||
feature_ids=[fe_id], url=tag, type=LINK_TYPE_GITHUB_ISSUE, information={}
|
||||
)
|
||||
fl.put()
|
||||
if webkit:
|
||||
fl = FeatureLinks(
|
||||
feature_ids=[fe_id], url=webkit, type=LINK_TYPE_GITHUB_ISSUE, information={}
|
||||
)
|
||||
fl.put()
|
||||
if gecko:
|
||||
fl = FeatureLinks(
|
||||
feature_ids=[fe_id], url=gecko, type=LINK_TYPE_GITHUB_ISSUE, information={}
|
||||
)
|
||||
fl.put()
|
||||
return fe
|
||||
|
||||
|
||||
class ExternalReviewsAPITest(testing_config.CustomTestCase):
|
||||
def setUp(self):
|
||||
self.handler = external_reviews_api.ExternalReviewsAPI()
|
||||
self.request_path = '/api/v0/external_reviews'
|
||||
self.maxDiff = None
|
||||
|
||||
def tearDown(self):
|
||||
kinds: list[ndb.Model] = [FeatureEntry, FeatureLinks, Stage, Gate]
|
||||
for kind in kinds:
|
||||
for entity in kind.query():
|
||||
entity.key.delete()
|
||||
|
||||
def test_no_reviews(self):
|
||||
"""When no reviews have been started, the result is empty."""
|
||||
make_feature('Feature one', STAGE_BLINK_PROTOTYPE)
|
||||
|
||||
actual = self.handler.do_get(review_group='tag')
|
||||
self.assertEqual({'reviews': [], 'link_previews': []}, actual)
|
||||
|
||||
def test_one_unfinished_tag_review(self):
|
||||
"""Basic success case."""
|
||||
tag = 'https://github.com/w3ctag/design-reviews/issues/1'
|
||||
webkit = 'https://github.com/WebKit/standards-positions/issues/3'
|
||||
fe = make_feature(
|
||||
'Feature one',
|
||||
STAGE_BLINK_PROTOTYPE,
|
||||
tag=tag,
|
||||
webkit=webkit,
|
||||
)
|
||||
|
||||
result = self.handler.do_get(review_group='tag')
|
||||
self.assertEqual(
|
||||
{
|
||||
'reviews': [
|
||||
dict(
|
||||
feature=dict(id=fe.key.id(), name='Feature one'),
|
||||
review_link=tag,
|
||||
current_stage='prototyping',
|
||||
estimated_start_milestone=None,
|
||||
estimated_end_milestone=None,
|
||||
)
|
||||
],
|
||||
'link_previews': [
|
||||
dict(
|
||||
url=tag, type=LINK_TYPE_GITHUB_ISSUE, information={}, http_error_code=None
|
||||
)
|
||||
],
|
||||
},
|
||||
result,
|
||||
)
|
||||
|
||||
def test_one_unfinished_webkit_review(self):
|
||||
tag = 'https://github.com/w3ctag/design-reviews/issues/1'
|
||||
webkit = 'https://github.com/WebKit/standards-positions/issues/3'
|
||||
fe = make_feature(
|
||||
'Feature one',
|
||||
STAGE_BLINK_PROTOTYPE,
|
||||
tag=tag,
|
||||
webkit=webkit,
|
||||
)
|
||||
|
||||
result = self.handler.do_get(review_group='webkit')
|
||||
self.assertEqual(
|
||||
{
|
||||
'reviews': [
|
||||
dict(
|
||||
feature=dict(id=fe.key.id(), name='Feature one'),
|
||||
review_link=webkit,
|
||||
current_stage='prototyping',
|
||||
estimated_start_milestone=None,
|
||||
estimated_end_milestone=None,
|
||||
)
|
||||
],
|
||||
'link_previews': [
|
||||
dict(
|
||||
url=webkit, type=LINK_TYPE_GITHUB_ISSUE, information={}, http_error_code=None
|
||||
)
|
||||
],
|
||||
},
|
||||
result,
|
||||
)
|
||||
|
||||
def test_one_unfinished_gecko_review(self):
|
||||
gecko = 'https://github.com/mozilla/standards-positions/issues/2'
|
||||
webkit = 'https://github.com/WebKit/standards-positions/issues/3'
|
||||
fe = make_feature(
|
||||
'Feature one',
|
||||
STAGE_BLINK_PROTOTYPE,
|
||||
gecko=gecko,
|
||||
webkit=webkit,
|
||||
)
|
||||
|
||||
result = self.handler.do_get(review_group='gecko')
|
||||
self.assertEqual(
|
||||
{
|
||||
'reviews': [
|
||||
dict(
|
||||
feature=dict(id=fe.key.id(), name='Feature one'),
|
||||
review_link=gecko,
|
||||
current_stage='prototyping',
|
||||
estimated_start_milestone=None,
|
||||
estimated_end_milestone=None,
|
||||
)
|
||||
],
|
||||
'link_previews': [
|
||||
dict(
|
||||
url=gecko, type=LINK_TYPE_GITHUB_ISSUE, information={}, http_error_code=None
|
||||
)
|
||||
],
|
||||
},
|
||||
result,
|
||||
)
|
||||
|
||||
def test_milestones_summarize(self):
|
||||
"""We take the earliest start milestone and the latest end milestone.
|
||||
|
||||
This isn't quite right for sorting urgency, since a later start milestone for some platforms
|
||||
probably indicates that the feature will ship later, but it makes more sense in the UI.
|
||||
"""
|
||||
tag = 'https://github.com/w3ctag/design-reviews/issues/1'
|
||||
webkit = 'https://github.com/WebKit/standards-positions/issues/3'
|
||||
fe = make_feature(
|
||||
'Feature one',
|
||||
STAGE_BLINK_PROTOTYPE,
|
||||
tag=tag,
|
||||
webkit=webkit,
|
||||
milestones=MilestoneSet(
|
||||
desktop_first=93, android_first=94, ios_last=95, webview_last=96
|
||||
),
|
||||
)
|
||||
|
||||
result = self.handler.do_get(review_group='tag')
|
||||
self.assertEqual(
|
||||
{
|
||||
'reviews': [
|
||||
dict(
|
||||
feature=dict(id=fe.key.id(), name='Feature one'),
|
||||
review_link=tag,
|
||||
current_stage='prototyping',
|
||||
estimated_start_milestone=93,
|
||||
estimated_end_milestone=96,
|
||||
)
|
||||
],
|
||||
'link_previews': [
|
||||
dict(
|
||||
url=tag, type=LINK_TYPE_GITHUB_ISSUE, information={}, http_error_code=None
|
||||
)
|
||||
],
|
||||
},
|
||||
result,
|
||||
)
|
||||
|
||||
def test_omit_non_review_links(self):
|
||||
"""Vendor positions of 'shipping', 'in development', and 'na' shouldn't be returned, even if
|
||||
they link to a standards-positions repository.
|
||||
"""
|
||||
webkit = 'https://github.com/WebKit/standards-positions/issues/3'
|
||||
fe = make_feature('Feature one', STAGE_BLINK_PROTOTYPE, webkit=webkit)
|
||||
result = self.handler.do_get(review_group='webkit')
|
||||
self.assertEqual(1, len(result['reviews']))
|
||||
for view in [SHIPPED, IN_DEV, SIGNALS_NA]:
|
||||
fe.safari_views = view
|
||||
fe.put()
|
||||
result = self.handler.do_get(review_group='webkit')
|
||||
self.assertEqual(0, len(result['reviews']))
|
||||
|
||||
def test_omit_review_links_to_non_review_repo(self):
|
||||
"""Links that aren't to the reviewer's positions repository shouldn't be returned."""
|
||||
webkit = 'https://github.com/WebKit/standards-positions/issues/3'
|
||||
fe = make_feature('Feature one', STAGE_BLINK_PROTOTYPE, webkit=webkit)
|
||||
result = self.handler.do_get(review_group='webkit')
|
||||
self.assertEqual(1, len(result['reviews']))
|
||||
fe.safari_views_link = (
|
||||
'https://github.com/whatwg/html/pull/10139#pullrequestreview-1966263347'
|
||||
)
|
||||
fe.put()
|
||||
result = self.handler.do_get(review_group='webkit')
|
||||
self.assertEqual(0, len(result['reviews']))
|
||||
|
||||
def test_finished_review_isnt_shown(self):
|
||||
tag = 'https://github.com/w3ctag/design-reviews/issues/1'
|
||||
webkit = 'https://github.com/WebKit/standards-positions/issues/3'
|
||||
fe = make_feature(
|
||||
'Feature one',
|
||||
STAGE_BLINK_PROTOTYPE,
|
||||
tag=tag,
|
||||
webkit=webkit,
|
||||
)
|
||||
fe.tag_review_resolution = 'unsatisfied'
|
||||
fe.put()
|
||||
|
||||
result = self.handler.do_get(review_group='tag')
|
||||
self.assertEqual(
|
||||
{
|
||||
'reviews': [],
|
||||
'link_previews': [],
|
||||
},
|
||||
result,
|
||||
)
|
||||
|
||||
def test_feature_without_a_crawled_link_isnt_shown(self):
|
||||
tag = 'https://github.com/w3ctag/design-reviews/issues/1'
|
||||
fe = make_feature(
|
||||
'Feature one',
|
||||
STAGE_BLINK_PROTOTYPE,
|
||||
tag=tag,
|
||||
)
|
||||
|
||||
result = self.handler.do_get(review_group='tag')
|
||||
self.assertEqual(1, len(result['reviews']))
|
||||
fe.tag_review = 'https://github.com/w3ctag/design-reviews/issues/2'
|
||||
fe.put()
|
||||
result = self.handler.do_get(review_group='tag')
|
||||
self.assertEqual(0, len(result['reviews']))
|
||||
|
||||
class FeatureDict(TypedDict):
|
||||
name: str
|
||||
summary: NotRequired[str]
|
||||
blink_components: NotRequired[str]
|
||||
owner_emails: NotRequired[str]
|
||||
category: NotRequired[int]
|
||||
feature_type: NotRequired[int]
|
||||
standard_maturity: NotRequired[int]
|
||||
impl_status_chrome: int
|
||||
ff_views: int
|
||||
ff_views_link: str | None
|
||||
safari_views: NotRequired[int]
|
||||
web_dev_views: NotRequired[int]
|
||||
safari_views_link: NotRequired[str]
|
||||
|
||||
def _use_ui_to_create_feature(
|
||||
self,
|
||||
fe: FeatureDict,
|
||||
active_stage_type: int,
|
||||
milestones: MilestoneSet | None = None,
|
||||
) -> FeatureEntry:
|
||||
"""Uses the same path as the web UI to create a feature.
|
||||
|
||||
This is slower than directly .put()ing FeatureEntries, but ensures at least 1 test makes no
|
||||
assumptions about what the UI actually does.
|
||||
"""
|
||||
name = fe['name']
|
||||
patch_update: dict[str, object] = dict(fe)
|
||||
# Only set the minimum set of fields in the initial POST. The FeaturesAPI expects to handle
|
||||
# most updates in the later PATCH call.
|
||||
initial_fields = dict(
|
||||
blink_components=patch_update.pop('blink_components', 'Blink'),
|
||||
category=patch_update.pop('category', MISC),
|
||||
feature_type=patch_update.pop('feature_type', FEATURE_TYPE_INCUBATE_ID),
|
||||
ff_views=patch_update.pop('ff_views'),
|
||||
impl_status_chrome=patch_update.pop('impl_status_chrome'),
|
||||
name=patch_update.pop('name'),
|
||||
safari_views=patch_update.pop('safari_views', NO_PUBLIC_SIGNALS),
|
||||
standard_maturity=patch_update.pop('standard_maturity', UNSET_STD),
|
||||
summary=patch_update.pop('summary', f'Summary for {name}'),
|
||||
web_dev_views=patch_update.pop('web_dev_views', NO_PUBLIC_SIGNALS),
|
||||
)
|
||||
with test_app.test_request_context('/api/v0/features/create', json=initial_fields):
|
||||
response = FeaturesAPI().do_post()
|
||||
# A new feature ID should be returned.
|
||||
self.assertIsInstance(response['feature_id'], int)
|
||||
# New feature should exist.
|
||||
new_feature = FeatureEntry.get_by_id(response['feature_id'])
|
||||
self.assertIsNotNone(new_feature)
|
||||
feature_id = new_feature.key.id()
|
||||
|
||||
# Now that the feature and its stages are created, update the rest of the fields, and the active
|
||||
# stage, using a PATCH.
|
||||
active_stage = Stage.query(
|
||||
Stage.feature_id == feature_id, Stage.stage_type == active_stage_type
|
||||
).fetch(keys_only=True)
|
||||
self.assertEqual(1, len(active_stage), active_stage)
|
||||
patch_update.update(id=feature_id, active_stage_id=active_stage[0].id())
|
||||
|
||||
class FeatureUpdate(TypedDict):
|
||||
feature_changes: dict[str, object]
|
||||
stages: list[dict[str, object]]
|
||||
|
||||
update: FeatureUpdate = dict(feature_changes=patch_update, stages=[])
|
||||
if milestones is not None:
|
||||
stage_info = dict(id=active_stage[0].id())
|
||||
for field_name, _type in MILESTONESET_FIELD_DATA_TYPES:
|
||||
value = getattr(milestones, field_name, None)
|
||||
if value is not None:
|
||||
stage_info[field_name] = dict(form_field_name=field_name, value=value)
|
||||
update['stages'].append(stage_info)
|
||||
|
||||
with test_app.test_request_context(f'/api/v0/features/{feature_id}', json=update):
|
||||
response = FeaturesAPI().do_patch()
|
||||
self.assertEqual(f'Feature {feature_id} updated.', response['message'])
|
||||
|
||||
return new_feature
|
||||
|
||||
@mock.patch.object(Link, '_parse_github_issue', autospec=True)
|
||||
def test_e2e_features_that_need_review_are_included(self, mockParse: mock.MagicMock):
|
||||
"""This one test goes through the same path as the UI to create features, to catch if other
|
||||
tests have made incorrect assumptions about how that flow works. This is slower, so it shouldn't
|
||||
be used to test every part of the feature.
|
||||
|
||||
This test also checks that a JSON file used by the Playwright tests is actually the output
|
||||
format for this API, which allows a test on the Playwright side to also check its assumptions
|
||||
about the output format.
|
||||
"""
|
||||
# Create a feature using the admin user.
|
||||
app_admin = AppUser(email='admin@example.com')
|
||||
app_admin.is_admin = True
|
||||
app_admin.put()
|
||||
|
||||
testing_config.sign_in(app_admin.email, app_admin.key.id())
|
||||
|
||||
unexpected_links: list[str] = []
|
||||
|
||||
def github_result(link):
|
||||
result = dict(
|
||||
url=re.sub(r'github\.com', 'api.github.com', link.url),
|
||||
number=1,
|
||||
title='A Title',
|
||||
user_login=None,
|
||||
state='open',
|
||||
state_reason=None,
|
||||
assignee_login=None,
|
||||
created_at='2024-04-15T08:30:42',
|
||||
updated_at='2024-04-15T10:30:43',
|
||||
closed_at=None,
|
||||
labels=[],
|
||||
)
|
||||
if link.url == 'https://github.com/mozilla/standards-positions/issues/1':
|
||||
result.update(
|
||||
number=1, labels=['position: oppose'], title="Opposed review isn't shown"
|
||||
)
|
||||
elif link.url == 'https://github.com/mozilla/standards-positions/issues/2':
|
||||
result.update(number=2)
|
||||
elif link.url == 'https://github.com/mozilla/standards-positions/issues/3':
|
||||
result.update(number=3)
|
||||
elif link.url == 'https://github.com/mozilla/standards-positions/issues/4':
|
||||
result.update(number=4)
|
||||
elif link.url == 'https://github.com/mozilla/standards-positions/issues/5':
|
||||
result.update(number=5)
|
||||
elif link.url == 'https://github.com/WebKit/standards-positions/issues/6':
|
||||
result.update(number=6)
|
||||
elif link.url == 'https://github.com/mozilla/standards-positions/issues/8':
|
||||
raise Exception(f'Expected fetch error for {link.url=}')
|
||||
elif link.url == 'https://github.com/mozilla/standards-positions/issues/9':
|
||||
result.update(number=4, state='closed', closed_at='2024-04-20T07:15:34')
|
||||
else:
|
||||
unexpected_links.append(link.url)
|
||||
return result
|
||||
|
||||
mockParse.side_effect = github_result
|
||||
|
||||
_f1 = self._use_ui_to_create_feature(
|
||||
dict(
|
||||
name='Feature 1',
|
||||
impl_status_chrome=IN_DEVELOPMENT,
|
||||
ff_views=NEUTRAL,
|
||||
ff_views_link='https://github.com/mozilla/standards-positions/issues/1',
|
||||
),
|
||||
active_stage_type=STAGE_BLINK_DEV_TRIAL,
|
||||
)
|
||||
f2 = self._use_ui_to_create_feature(
|
||||
dict(
|
||||
name='Feature 2',
|
||||
feature_type=FEATURE_TYPE_EXISTING_ID,
|
||||
impl_status_chrome=ENABLED_BY_DEFAULT,
|
||||
ff_views=NEUTRAL,
|
||||
ff_views_link='https://github.com/mozilla/standards-positions/issues/2',
|
||||
),
|
||||
active_stage_type=STAGE_FAST_SHIPPING,
|
||||
)
|
||||
f3 = self._use_ui_to_create_feature(
|
||||
dict(
|
||||
name='Feature 3',
|
||||
impl_status_chrome=PROPOSED,
|
||||
ff_views=NO_PUBLIC_SIGNALS,
|
||||
ff_views_link='https://github.com/mozilla/standards-positions/issues/3',
|
||||
),
|
||||
active_stage_type=STAGE_BLINK_PROTOTYPE,
|
||||
milestones=MilestoneSet(desktop_first=101, desktop_last=103),
|
||||
)
|
||||
f4 = self._use_ui_to_create_feature(
|
||||
dict(
|
||||
name='Feature 4',
|
||||
impl_status_chrome=ENABLED_BY_DEFAULT,
|
||||
ff_views=NO_PUBLIC_SIGNALS,
|
||||
ff_views_link='https://github.com/mozilla/standards-positions/issues/4',
|
||||
),
|
||||
active_stage_type=STAGE_BLINK_PROTOTYPE,
|
||||
)
|
||||
f5 = self._use_ui_to_create_feature(
|
||||
dict(
|
||||
name='Feature 5',
|
||||
impl_status_chrome=PROPOSED,
|
||||
ff_views=NO_PUBLIC_SIGNALS,
|
||||
ff_views_link='https://github.com/mozilla/standards-positions/issues/5',
|
||||
),
|
||||
active_stage_type=STAGE_BLINK_PROTOTYPE,
|
||||
milestones=MilestoneSet(desktop_first=100, desktop_last=104),
|
||||
)
|
||||
_f6 = self._use_ui_to_create_feature(
|
||||
dict(
|
||||
name='Feature 6',
|
||||
impl_status_chrome=PROPOSED,
|
||||
ff_views=SHIPPED,
|
||||
ff_views_link=None,
|
||||
# Not a Firefox view, so this won't be included in the results.
|
||||
safari_views_link='https://github.com/WebKit/standards-positions/issues/6',
|
||||
),
|
||||
active_stage_type=STAGE_BLINK_DEV_TRIAL,
|
||||
)
|
||||
f7 = self._use_ui_to_create_feature(
|
||||
dict(
|
||||
name='Feature 7 shares a review with Feature 5',
|
||||
impl_status_chrome=PROPOSED,
|
||||
ff_views=NO_PUBLIC_SIGNALS,
|
||||
ff_views_link='https://github.com/mozilla/standards-positions/issues/5',
|
||||
),
|
||||
active_stage_type=STAGE_BLINK_ORIGIN_TRIAL,
|
||||
milestones=MilestoneSet(desktop_first=100, desktop_last=104),
|
||||
)
|
||||
with self.assertLogs(level=logging.ERROR): # So the log doesn't echo.
|
||||
_f8 = self._use_ui_to_create_feature(
|
||||
dict(
|
||||
name='Feature 8 has a nonexistent standards-position link',
|
||||
impl_status_chrome=PROPOSED,
|
||||
ff_views=NO_PUBLIC_SIGNALS,
|
||||
ff_views_link='https://github.com/mozilla/standards-positions/issues/8',
|
||||
),
|
||||
active_stage_type=STAGE_BLINK_PROTOTYPE,
|
||||
)
|
||||
_f9 = self._use_ui_to_create_feature(
|
||||
dict(
|
||||
name='Feature 9 is closed without a position',
|
||||
impl_status_chrome=PROPOSED,
|
||||
ff_views=NO_PUBLIC_SIGNALS,
|
||||
ff_views_link='https://github.com/mozilla/standards-positions/issues/9',
|
||||
),
|
||||
active_stage_type=STAGE_BLINK_PROTOTYPE,
|
||||
)
|
||||
|
||||
testing_config.sign_out()
|
||||
|
||||
result = self.handler.do_get(review_group='gecko')
|
||||
|
||||
# This test expectation is saved to a JSON file so the
|
||||
# Playwright tests can use it as a mock API response. Because the real feature IDs are
|
||||
# dynamically generated, we have to slot them into the right places here.
|
||||
with open(
|
||||
os.path.join(
|
||||
os.path.dirname(__file__),
|
||||
'../packages/playwright/tests/external_reviews_api_result.json',
|
||||
)
|
||||
) as f:
|
||||
expected_response = json.load(f)
|
||||
expected_response['reviews'][0]['feature']['id'] = f7.key.id()
|
||||
expected_response['reviews'][1]['feature']['id'] = f3.key.id()
|
||||
expected_response['reviews'][2]['feature']['id'] = f5.key.id()
|
||||
expected_response['reviews'][3]['feature']['id'] = f4.key.id()
|
||||
expected_response['reviews'][4]['feature']['id'] = f2.key.id()
|
||||
|
||||
self.assertEqual(expected_response, result)
|
||||
self.assertEqual([], unexpected_links)
|
|
@ -93,6 +93,8 @@ import './elements/chromedash-timeline';
|
|||
import './elements/chromedash-timeline-page';
|
||||
import './elements/chromedash-toast';
|
||||
import './elements/chromedash-typeahead';
|
||||
import './elements/chromedash-report-external-reviews-dispatch-page';
|
||||
import './elements/chromedash-report-external-reviews-page';
|
||||
import './elements/chromedash-report-feature-latency-page';
|
||||
import './elements/chromedash-report-spec-mentors-page';
|
||||
import './elements/chromedash-report-review-latency-page';
|
||||
|
|
|
@ -494,6 +494,24 @@ class ChromedashApp extends LitElement {
|
|||
page('/metrics/feature/timeline/popularity', () =>
|
||||
page.redirect('/metrics/feature/popularity')
|
||||
);
|
||||
page('/reports/external_reviews', ctx => {
|
||||
if (
|
||||
!this.setupNewPage(
|
||||
ctx,
|
||||
'chromedash-report-external-reviews-dispatch-page'
|
||||
)
|
||||
)
|
||||
return;
|
||||
});
|
||||
page('/reports/external_reviews/:reviewer', ctx => {
|
||||
if (!['tag', 'gecko', 'webkit'].includes(ctx.params.reviewer)) {
|
||||
page.redirect('/reports/external_reviews');
|
||||
return;
|
||||
}
|
||||
if (!this.setupNewPage(ctx, 'chromedash-report-external-reviews-page'))
|
||||
return;
|
||||
this.pageComponent.reviewer = ctx.params.reviewer;
|
||||
});
|
||||
page('/reports/spec_mentors', ctx => {
|
||||
if (!this.setupNewPage(ctx, 'chromedash-report-spec-mentors-page'))
|
||||
return;
|
||||
|
|
|
@ -282,6 +282,7 @@ export class ChromedashDrawer extends LitElement {
|
|||
<hr />
|
||||
<div class="section-header">Reports</div>
|
||||
${this.renderNavItem('/reports/spec_mentors', 'Spec Mentors')}
|
||||
${this.renderNavItem('/reports/external_reviews', 'External Reviews')}
|
||||
${adminMenu}
|
||||
</sl-drawer>
|
||||
`;
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
// @ts-check
|
||||
import {LitElement, html} from 'lit';
|
||||
import {SHARED_STYLES} from '../css/shared-css.js';
|
||||
|
||||
export class ChromedashReportExternalReviewsDispatchPage extends LitElement {
|
||||
static get styles() {
|
||||
return SHARED_STYLES;
|
||||
}
|
||||
|
||||
render() {
|
||||
return html`
|
||||
<div id="subheader">Which group's reviews do you want to see?</div>
|
||||
<ul>
|
||||
<li><a href="/reports/external_reviews/tag">W3C TAG</a></li>
|
||||
<li>
|
||||
<a href="/reports/external_reviews/gecko"
|
||||
>Gecko / Firefox / Mozilla</a
|
||||
>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/reports/external_reviews/webkit">WebKit / Safari / Apple</a>
|
||||
</li>
|
||||
</ul>
|
||||
`;
|
||||
}
|
||||
}
|
||||
|
||||
customElements.define(
|
||||
'chromedash-report-external-reviews-dispatch-page',
|
||||
ChromedashReportExternalReviewsDispatchPage
|
||||
);
|
|
@ -0,0 +1,259 @@
|
|||
// @ts-check
|
||||
import {Task} from '@lit/task';
|
||||
import '@shoelace-style/shoelace';
|
||||
import {LitElement, css, html, nothing} from 'lit';
|
||||
import {SHARED_STYLES} from '../css/shared-css.js';
|
||||
|
||||
/**
|
||||
* @typedef {import('chromestatus-openapi').ExternalReviewsResponse} ExternalReviewsResponse
|
||||
* @typedef {import('chromestatus-openapi').OutstandingReview} OutstandingReview
|
||||
* @typedef {import('chromestatus-openapi').OutstandingReviewCurrentStageEnum} Stage
|
||||
*/
|
||||
|
||||
/** Array.sort() comparison helper function ordering numbers ascending and putting undefined last.
|
||||
*
|
||||
* @param {number | undefined} a
|
||||
* @param {number | undefined} b
|
||||
* @returns {number}
|
||||
*/
|
||||
function ascendingNumberUndefinedLast(a, b) {
|
||||
if (a === b) return 0;
|
||||
if (a === undefined) return 1;
|
||||
if (b === undefined) return -1;
|
||||
return a - b;
|
||||
}
|
||||
|
||||
/** Array.sort() comparison function to order outstanding reviews by descending urgency.
|
||||
*
|
||||
* Reviews' features must be within the same stage.
|
||||
*
|
||||
* @param {OutstandingReview} a
|
||||
* @param {OutstandingReview} b
|
||||
* @returns {number}
|
||||
*/
|
||||
function compareOutstandingReview(a, b) {
|
||||
console.assert(
|
||||
a.current_stage === b.current_stage,
|
||||
`Tried to compare features at stages ${a.current_stage} and ` +
|
||||
`${b.current_stage} using a function that ignores features' stages.`
|
||||
);
|
||||
if (a.estimated_end_milestone !== b.estimated_end_milestone) {
|
||||
// Lower milestones are happening sooner and so more urgent.
|
||||
return ascendingNumberUndefinedLast(
|
||||
a.estimated_end_milestone,
|
||||
b.estimated_end_milestone
|
||||
);
|
||||
}
|
||||
if (a.estimated_start_milestone !== b.estimated_start_milestone) {
|
||||
return ascendingNumberUndefinedLast(
|
||||
a.estimated_start_milestone,
|
||||
b.estimated_start_milestone
|
||||
);
|
||||
}
|
||||
// Break ties by putting review links in ascending order, which for github issues puts them in
|
||||
// order by creation time.
|
||||
if (a.review_link < b.review_link) {
|
||||
return -1;
|
||||
}
|
||||
if (a.review_link > b.review_link) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
export class ChromedashReportExternalReviewsPage extends LitElement {
|
||||
static get styles() {
|
||||
return [
|
||||
...SHARED_STYLES,
|
||||
css`
|
||||
h2 {
|
||||
margin-top: var(--content-padding);
|
||||
margin-bottom: var(--content-padding-quarter);
|
||||
|
||||
sl-skeleton {
|
||||
width: 30%;
|
||||
height: 1lh;
|
||||
}
|
||||
}
|
||||
td.feature,
|
||||
td.review {
|
||||
width: 45%;
|
||||
}
|
||||
td.milestones {
|
||||
width: 10%;
|
||||
}
|
||||
`,
|
||||
];
|
||||
}
|
||||
|
||||
static get properties() {
|
||||
return {
|
||||
reviewer: {type: String},
|
||||
};
|
||||
}
|
||||
|
||||
/** @type {'tag' | 'gecko' | 'webkit'} */
|
||||
reviewer;
|
||||
|
||||
/** @type {import('chromestatus-openapi').DefaultApiInterface} */
|
||||
_client;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
// @ts-ignore
|
||||
this._client = window.csOpenApiClient;
|
||||
this._reviewsTask = new Task(this, {
|
||||
task: async ([reviewer], {signal}) => {
|
||||
const response = await this._client.listExternalReviews(
|
||||
{reviewGroup: reviewer},
|
||||
{signal}
|
||||
);
|
||||
return {
|
||||
reviews: this.groupReviews(response.reviews),
|
||||
links: response.link_previews,
|
||||
noOutstandingReviews: response.reviews.length === 0,
|
||||
};
|
||||
},
|
||||
args: () => [this.reviewer],
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {OutstandingReview[]} reviews
|
||||
* @returns {Record<Stage, OutstandingReview[]>}
|
||||
*/
|
||||
groupReviews(reviews) {
|
||||
/** @type {Record<Stage, OutstandingReview[]>} */
|
||||
const result = {
|
||||
incubating: [],
|
||||
prototyping: [],
|
||||
'dev-trial': [],
|
||||
'wide-review': [],
|
||||
'origin-trial': [],
|
||||
shipping: [],
|
||||
shipped: [],
|
||||
};
|
||||
for (const review of reviews) {
|
||||
if (review.current_stage) {
|
||||
result[review.current_stage].push(review);
|
||||
}
|
||||
}
|
||||
for (const list of Object.values(result)) {
|
||||
list.sort(compareOutstandingReview);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
headerRow() {
|
||||
return html`<tr>
|
||||
<th>Feature</th>
|
||||
<th>Review</th>
|
||||
<th>Target Milestones</th>
|
||||
</tr>`;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Record<import("chromestatus-openapi").OutstandingReviewCurrentStageEnum, import("chromestatus-openapi").OutstandingReview[]>} reviews
|
||||
* @param {import('../js-src/cs-client.js').FeatureLink[]} links
|
||||
*/
|
||||
renderOutstandingReviews(reviews, links) {
|
||||
return [
|
||||
['Preparing to ship', 'shipping'],
|
||||
['In Origin Trial', 'origin-trial'],
|
||||
['Getting wide review', 'wide-review'],
|
||||
['In developer trials', 'dev-trial'],
|
||||
['Prototyping', 'prototyping'],
|
||||
['Incubating', 'incubating'],
|
||||
['Already shipped', 'shipped'],
|
||||
].map(([title, key]) =>
|
||||
reviews[key].length > 0
|
||||
? html`<section>
|
||||
<h2 id=${key}>${title}</h2>
|
||||
<table class="data-table">
|
||||
${this.headerRow()}
|
||||
${reviews[key].map(
|
||||
/** @param {OutstandingReview} review */ review => html`
|
||||
<tr>
|
||||
<td class="feature">
|
||||
<a href="/feature/${review.feature.id}"
|
||||
>${review.feature.name}</a
|
||||
>
|
||||
</td>
|
||||
<td class="review">
|
||||
<chromedash-link
|
||||
href=${review.review_link}
|
||||
.featureLinks=${links}
|
||||
></chromedash-link>
|
||||
</td>
|
||||
<td class="milestones">
|
||||
${review.estimated_start_milestone
|
||||
? 'M' + review.estimated_start_milestone
|
||||
: nothing}${['shipping', 'shipped'].includes(
|
||||
review.current_stage
|
||||
)
|
||||
? nothing
|
||||
: html`${review.estimated_start_milestone ||
|
||||
review.estimated_end_milestone
|
||||
? '–'
|
||||
: nothing}${review.estimated_end_milestone
|
||||
? 'M' + review.estimated_end_milestone
|
||||
: nothing}`}
|
||||
</td>
|
||||
</tr>
|
||||
`
|
||||
)}
|
||||
</table>
|
||||
</section>`
|
||||
: nothing
|
||||
);
|
||||
}
|
||||
|
||||
render() {
|
||||
return html`
|
||||
<div id="subheader">
|
||||
Reviews are in rough order of urgency, from about-to-ship down to
|
||||
incubations. Already-shipped features are listed at the bottom.
|
||||
</div>
|
||||
${this._reviewsTask.render({
|
||||
pending: () => html`
|
||||
<section>
|
||||
<h2><sl-skeleton effect="sheen"></sl-skeleton></h2>
|
||||
<table class="data-table">
|
||||
${this.headerRow()}
|
||||
${[1, 2, 3].map(
|
||||
() => html`
|
||||
<tr>
|
||||
<td class="feature">
|
||||
<sl-skeleton effect="sheen"></sl-skeleton>
|
||||
</td>
|
||||
<td class="review">
|
||||
<sl-skeleton effect="sheen"></sl-skeleton>
|
||||
</td>
|
||||
<td class="milestones">
|
||||
<sl-skeleton effect="sheen"></sl-skeleton>
|
||||
</td>
|
||||
</tr>
|
||||
`
|
||||
)}
|
||||
</table>
|
||||
</section>
|
||||
`,
|
||||
complete: ({reviews, links, noOutstandingReviews}) =>
|
||||
noOutstandingReviews
|
||||
? html`No outstanding reviews. Congratulations!`
|
||||
: this.renderOutstandingReviews(reviews, links),
|
||||
error: e => {
|
||||
console.error(`Couldn't fetch ${this.reviewer}'s reviews: `, e);
|
||||
return html`<p>
|
||||
Some errors occurred. Please refresh the page or try again later.
|
||||
</p>`;
|
||||
},
|
||||
})}
|
||||
`;
|
||||
}
|
||||
}
|
||||
|
||||
customElements.define(
|
||||
'chromedash-report-external-reviews-page',
|
||||
ChromedashReportExternalReviewsPage
|
||||
);
|
|
@ -9,9 +9,25 @@ src/index.ts
|
|||
src/models/ComponentUsersRequest.ts
|
||||
src/models/ComponentsUser.ts
|
||||
src/models/ComponentsUsersResponse.ts
|
||||
src/models/ExternalReviewsResponse.ts
|
||||
src/models/FeatureLatency.ts
|
||||
src/models/FeatureLink.ts
|
||||
src/models/GateLatency.ts
|
||||
src/models/LinkPreview.ts
|
||||
src/models/LinkPreviewBase.ts
|
||||
src/models/LinkPreviewGithubIssue.ts
|
||||
src/models/LinkPreviewGithubIssueAllOfInformation.ts
|
||||
src/models/LinkPreviewGithubMarkdown.ts
|
||||
src/models/LinkPreviewGithubMarkdownAllOfInformation.ts
|
||||
src/models/LinkPreviewGithubPullRequest.ts
|
||||
src/models/LinkPreviewGoogleDocs.ts
|
||||
src/models/LinkPreviewMdnDocs.ts
|
||||
src/models/LinkPreviewMozillaBug.ts
|
||||
src/models/LinkPreviewOpenGraph.ts
|
||||
src/models/LinkPreviewOpenGraphAllOfInformation.ts
|
||||
src/models/LinkPreviewSpecs.ts
|
||||
src/models/LinkPreviewWebkitBug.ts
|
||||
src/models/OutstandingReview.ts
|
||||
src/models/OwnersAndSubscribersOfComponent.ts
|
||||
src/models/ReviewLatency.ts
|
||||
src/models/SpecMentor.ts
|
||||
|
|
|
@ -17,6 +17,7 @@ import * as runtime from '../runtime';
|
|||
import type {
|
||||
ComponentUsersRequest,
|
||||
ComponentsUsersResponse,
|
||||
ExternalReviewsResponse,
|
||||
FeatureLatency,
|
||||
ReviewLatency,
|
||||
SpecMentor,
|
||||
|
@ -26,6 +27,8 @@ import {
|
|||
ComponentUsersRequestToJSON,
|
||||
ComponentsUsersResponseFromJSON,
|
||||
ComponentsUsersResponseToJSON,
|
||||
ExternalReviewsResponseFromJSON,
|
||||
ExternalReviewsResponseToJSON,
|
||||
FeatureLatencyFromJSON,
|
||||
FeatureLatencyToJSON,
|
||||
ReviewLatencyFromJSON,
|
||||
|
@ -40,6 +43,10 @@ export interface AddUserToComponentRequest {
|
|||
componentUsersRequest?: ComponentUsersRequest;
|
||||
}
|
||||
|
||||
export interface ListExternalReviewsRequest {
|
||||
reviewGroup: ListExternalReviewsReviewGroupEnum;
|
||||
}
|
||||
|
||||
export interface ListFeatureLatencyRequest {
|
||||
startAt: Date;
|
||||
endAt: Date;
|
||||
|
@ -93,6 +100,21 @@ export interface DefaultApiInterface {
|
|||
*/
|
||||
listComponentUsers(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ComponentsUsersResponse>;
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary List features whose external reviews are incomplete
|
||||
* @param {'tag' | 'gecko' | 'webkit'} reviewGroup Which review group to focus on: * `tag` - The W3C TAG * `gecko` - The rendering engine that powers Mozilla Firefox * `webkit` - The rendering engine that powers Apple Safari
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof DefaultApiInterface
|
||||
*/
|
||||
listExternalReviewsRaw(requestParameters: ListExternalReviewsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ExternalReviewsResponse>>;
|
||||
|
||||
/**
|
||||
* List features whose external reviews are incomplete
|
||||
*/
|
||||
listExternalReviews(requestParameters: ListExternalReviewsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ExternalReviewsResponse>;
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary List how long each feature took to launch
|
||||
|
@ -232,6 +254,36 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
|
|||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* List features whose external reviews are incomplete
|
||||
*/
|
||||
async listExternalReviewsRaw(requestParameters: ListExternalReviewsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ExternalReviewsResponse>> {
|
||||
if (requestParameters.reviewGroup === null || requestParameters.reviewGroup === undefined) {
|
||||
throw new runtime.RequiredError('reviewGroup','Required parameter requestParameters.reviewGroup was null or undefined when calling listExternalReviews.');
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
const response = await this.request({
|
||||
path: `/external_reviews/{review_group}`.replace(`{${"review_group"}}`, encodeURIComponent(String(requestParameters.reviewGroup))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ExternalReviewsResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* List features whose external reviews are incomplete
|
||||
*/
|
||||
async listExternalReviews(requestParameters: ListExternalReviewsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ExternalReviewsResponse> {
|
||||
const response = await this.listExternalReviewsRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* List how long each feature took to launch
|
||||
*/
|
||||
|
@ -371,3 +423,13 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const ListExternalReviewsReviewGroupEnum = {
|
||||
tag: 'tag',
|
||||
gecko: 'gecko',
|
||||
webkit: 'webkit'
|
||||
} as const;
|
||||
export type ListExternalReviewsReviewGroupEnum = typeof ListExternalReviewsReviewGroupEnum[keyof typeof ListExternalReviewsReviewGroupEnum];
|
||||
|
|
|
@ -0,0 +1,88 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* chomestatus API
|
||||
* The API for chromestatus.com. chromestatus.com is the official tool used for tracking feature launches in Blink (the browser engine that powers Chrome and many other web browsers). This tool guides feature owners through our launch process and serves as a primary source for developer information that then ripples throughout the web developer ecosystem. More details at: https://github.com/GoogleChrome/chromium-dashboard
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { LinkPreview } from './LinkPreview';
|
||||
import {
|
||||
LinkPreviewFromJSON,
|
||||
LinkPreviewFromJSONTyped,
|
||||
LinkPreviewToJSON,
|
||||
} from './LinkPreview';
|
||||
import type { OutstandingReview } from './OutstandingReview';
|
||||
import {
|
||||
OutstandingReviewFromJSON,
|
||||
OutstandingReviewFromJSONTyped,
|
||||
OutstandingReviewToJSON,
|
||||
} from './OutstandingReview';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ExternalReviewsResponse
|
||||
*/
|
||||
export interface ExternalReviewsResponse {
|
||||
/**
|
||||
*
|
||||
* @type {Array<OutstandingReview>}
|
||||
* @memberof ExternalReviewsResponse
|
||||
*/
|
||||
reviews: Array<OutstandingReview>;
|
||||
/**
|
||||
*
|
||||
* @type {Array<LinkPreview>}
|
||||
* @memberof ExternalReviewsResponse
|
||||
*/
|
||||
link_previews: Array<LinkPreview>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ExternalReviewsResponse interface.
|
||||
*/
|
||||
export function instanceOfExternalReviewsResponse(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "reviews" in value;
|
||||
isInstance = isInstance && "link_previews" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function ExternalReviewsResponseFromJSON(json: any): ExternalReviewsResponse {
|
||||
return ExternalReviewsResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ExternalReviewsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExternalReviewsResponse {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'reviews': ((json['reviews'] as Array<any>).map(OutstandingReviewFromJSON)),
|
||||
'link_previews': ((json['link_previews'] as Array<any>).map(LinkPreviewFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
export function ExternalReviewsResponseToJSON(value?: ExternalReviewsResponse | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'reviews': ((value.reviews as Array<any>).map(OutstandingReviewToJSON)),
|
||||
'link_previews': ((value.link_previews as Array<any>).map(LinkPreviewToJSON)),
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,130 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* chomestatus API
|
||||
* The API for chromestatus.com. chromestatus.com is the official tool used for tracking feature launches in Blink (the browser engine that powers Chrome and many other web browsers). This tool guides feature owners through our launch process and serves as a primary source for developer information that then ripples throughout the web developer ecosystem. More details at: https://github.com/GoogleChrome/chromium-dashboard
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import {
|
||||
LinkPreviewGithubIssueFromJSONTyped,
|
||||
LinkPreviewGithubMarkdownFromJSONTyped,
|
||||
LinkPreviewGithubPullRequestFromJSONTyped,
|
||||
LinkPreviewGoogleDocsFromJSONTyped,
|
||||
LinkPreviewMdnDocsFromJSONTyped,
|
||||
LinkPreviewMozillaBugFromJSONTyped,
|
||||
LinkPreviewSpecsFromJSONTyped,
|
||||
LinkPreviewWebkitBugFromJSONTyped
|
||||
} from './index';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface LinkPreview
|
||||
*/
|
||||
export interface LinkPreview {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof LinkPreview
|
||||
*/
|
||||
url: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof LinkPreview
|
||||
*/
|
||||
type: string;
|
||||
/**
|
||||
*
|
||||
* @type {object}
|
||||
* @memberof LinkPreview
|
||||
*/
|
||||
information: object;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof LinkPreview
|
||||
*/
|
||||
http_error_code: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the LinkPreview interface.
|
||||
*/
|
||||
export function instanceOfLinkPreview(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "url" in value;
|
||||
isInstance = isInstance && "type" in value;
|
||||
isInstance = isInstance && "information" in value;
|
||||
isInstance = isInstance && "http_error_code" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function LinkPreviewFromJSON(json: any): LinkPreview {
|
||||
return LinkPreviewFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function LinkPreviewFromJSONTyped(json: any, ignoreDiscriminator: boolean): LinkPreview {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
if (!ignoreDiscriminator) {
|
||||
if (json['type'] === 'github_issue') {
|
||||
return LinkPreviewGithubIssueFromJSONTyped(json, true);
|
||||
}
|
||||
if (json['type'] === 'github_markdown') {
|
||||
return LinkPreviewGithubMarkdownFromJSONTyped(json, true);
|
||||
}
|
||||
if (json['type'] === 'github_pull_request') {
|
||||
return LinkPreviewGithubPullRequestFromJSONTyped(json, true);
|
||||
}
|
||||
if (json['type'] === 'google_docs') {
|
||||
return LinkPreviewGoogleDocsFromJSONTyped(json, true);
|
||||
}
|
||||
if (json['type'] === 'mdn_docs') {
|
||||
return LinkPreviewMdnDocsFromJSONTyped(json, true);
|
||||
}
|
||||
if (json['type'] === 'mozilla_bug') {
|
||||
return LinkPreviewMozillaBugFromJSONTyped(json, true);
|
||||
}
|
||||
if (json['type'] === 'specs') {
|
||||
return LinkPreviewSpecsFromJSONTyped(json, true);
|
||||
}
|
||||
if (json['type'] === 'webkit_bug') {
|
||||
return LinkPreviewWebkitBugFromJSONTyped(json, true);
|
||||
}
|
||||
}
|
||||
return {
|
||||
|
||||
'url': json['url'],
|
||||
'type': json['type'],
|
||||
'information': json['information'],
|
||||
'http_error_code': json['http_error_code'],
|
||||
};
|
||||
}
|
||||
|
||||
export function LinkPreviewToJSON(value?: LinkPreview | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'url': value.url,
|
||||
'type': value.type,
|
||||
'information': value.information,
|
||||
'http_error_code': value.http_error_code,
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* chomestatus API
|
||||
* The API for chromestatus.com. chromestatus.com is the official tool used for tracking feature launches in Blink (the browser engine that powers Chrome and many other web browsers). This tool guides feature owners through our launch process and serves as a primary source for developer information that then ripples throughout the web developer ecosystem. More details at: https://github.com/GoogleChrome/chromium-dashboard
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface LinkPreviewBase
|
||||
*/
|
||||
export interface LinkPreviewBase {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof LinkPreviewBase
|
||||
*/
|
||||
url: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof LinkPreviewBase
|
||||
*/
|
||||
type: string;
|
||||
/**
|
||||
*
|
||||
* @type {object}
|
||||
* @memberof LinkPreviewBase
|
||||
*/
|
||||
information: object;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof LinkPreviewBase
|
||||
*/
|
||||
http_error_code: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the LinkPreviewBase interface.
|
||||
*/
|
||||
export function instanceOfLinkPreviewBase(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "url" in value;
|
||||
isInstance = isInstance && "type" in value;
|
||||
isInstance = isInstance && "information" in value;
|
||||
isInstance = isInstance && "http_error_code" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function LinkPreviewBaseFromJSON(json: any): LinkPreviewBase {
|
||||
return LinkPreviewBaseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function LinkPreviewBaseFromJSONTyped(json: any, ignoreDiscriminator: boolean): LinkPreviewBase {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'url': json['url'],
|
||||
'type': json['type'],
|
||||
'information': json['information'],
|
||||
'http_error_code': json['http_error_code'],
|
||||
};
|
||||
}
|
||||
|
||||
export function LinkPreviewBaseToJSON(value?: LinkPreviewBase | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'url': value.url,
|
||||
'type': value.type,
|
||||
'information': value.information,
|
||||
'http_error_code': value.http_error_code,
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,100 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* chomestatus API
|
||||
* The API for chromestatus.com. chromestatus.com is the official tool used for tracking feature launches in Blink (the browser engine that powers Chrome and many other web browsers). This tool guides feature owners through our launch process and serves as a primary source for developer information that then ripples throughout the web developer ecosystem. More details at: https://github.com/GoogleChrome/chromium-dashboard
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { LinkPreviewGithubIssueAllOfInformation } from './LinkPreviewGithubIssueAllOfInformation';
|
||||
import {
|
||||
LinkPreviewGithubIssueAllOfInformationFromJSON,
|
||||
LinkPreviewGithubIssueAllOfInformationFromJSONTyped,
|
||||
LinkPreviewGithubIssueAllOfInformationToJSON,
|
||||
} from './LinkPreviewGithubIssueAllOfInformation';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface LinkPreviewGithubIssue
|
||||
*/
|
||||
export interface LinkPreviewGithubIssue {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof LinkPreviewGithubIssue
|
||||
*/
|
||||
url: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof LinkPreviewGithubIssue
|
||||
*/
|
||||
type: string;
|
||||
/**
|
||||
*
|
||||
* @type {LinkPreviewGithubIssueAllOfInformation}
|
||||
* @memberof LinkPreviewGithubIssue
|
||||
*/
|
||||
information: LinkPreviewGithubIssueAllOfInformation;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof LinkPreviewGithubIssue
|
||||
*/
|
||||
http_error_code: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the LinkPreviewGithubIssue interface.
|
||||
*/
|
||||
export function instanceOfLinkPreviewGithubIssue(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "url" in value;
|
||||
isInstance = isInstance && "type" in value;
|
||||
isInstance = isInstance && "information" in value;
|
||||
isInstance = isInstance && "http_error_code" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function LinkPreviewGithubIssueFromJSON(json: any): LinkPreviewGithubIssue {
|
||||
return LinkPreviewGithubIssueFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function LinkPreviewGithubIssueFromJSONTyped(json: any, ignoreDiscriminator: boolean): LinkPreviewGithubIssue {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'url': json['url'],
|
||||
'type': json['type'],
|
||||
'information': LinkPreviewGithubIssueAllOfInformationFromJSON(json['information']),
|
||||
'http_error_code': json['http_error_code'],
|
||||
};
|
||||
}
|
||||
|
||||
export function LinkPreviewGithubIssueToJSON(value?: LinkPreviewGithubIssue | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'url': value.url,
|
||||
'type': value.type,
|
||||
'information': LinkPreviewGithubIssueAllOfInformationToJSON(value.information),
|
||||
'http_error_code': value.http_error_code,
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,166 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* chomestatus API
|
||||
* The API for chromestatus.com. chromestatus.com is the official tool used for tracking feature launches in Blink (the browser engine that powers Chrome and many other web browsers). This tool guides feature owners through our launch process and serves as a primary source for developer information that then ripples throughout the web developer ecosystem. More details at: https://github.com/GoogleChrome/chromium-dashboard
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface LinkPreviewGithubIssueAllOfInformation
|
||||
*/
|
||||
export interface LinkPreviewGithubIssueAllOfInformation {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof LinkPreviewGithubIssueAllOfInformation
|
||||
*/
|
||||
url?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof LinkPreviewGithubIssueAllOfInformation
|
||||
*/
|
||||
number?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof LinkPreviewGithubIssueAllOfInformation
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof LinkPreviewGithubIssueAllOfInformation
|
||||
*/
|
||||
user_login?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof LinkPreviewGithubIssueAllOfInformation
|
||||
*/
|
||||
state?: LinkPreviewGithubIssueAllOfInformationStateEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof LinkPreviewGithubIssueAllOfInformation
|
||||
*/
|
||||
state_reason?: LinkPreviewGithubIssueAllOfInformationStateReasonEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof LinkPreviewGithubIssueAllOfInformation
|
||||
*/
|
||||
assignee_login?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof LinkPreviewGithubIssueAllOfInformation
|
||||
*/
|
||||
created_at?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof LinkPreviewGithubIssueAllOfInformation
|
||||
*/
|
||||
updated_at?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof LinkPreviewGithubIssueAllOfInformation
|
||||
*/
|
||||
closed_at?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {Array<string>}
|
||||
* @memberof LinkPreviewGithubIssueAllOfInformation
|
||||
*/
|
||||
labels?: Array<string>;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const LinkPreviewGithubIssueAllOfInformationStateEnum = {
|
||||
open: 'open',
|
||||
closed: 'closed'
|
||||
} as const;
|
||||
export type LinkPreviewGithubIssueAllOfInformationStateEnum = typeof LinkPreviewGithubIssueAllOfInformationStateEnum[keyof typeof LinkPreviewGithubIssueAllOfInformationStateEnum];
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const LinkPreviewGithubIssueAllOfInformationStateReasonEnum = {
|
||||
completed: 'completed',
|
||||
reopened: 'reopened',
|
||||
not_planned: 'not_planned'
|
||||
} as const;
|
||||
export type LinkPreviewGithubIssueAllOfInformationStateReasonEnum = typeof LinkPreviewGithubIssueAllOfInformationStateReasonEnum[keyof typeof LinkPreviewGithubIssueAllOfInformationStateReasonEnum];
|
||||
|
||||
|
||||
/**
|
||||
* Check if a given object implements the LinkPreviewGithubIssueAllOfInformation interface.
|
||||
*/
|
||||
export function instanceOfLinkPreviewGithubIssueAllOfInformation(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function LinkPreviewGithubIssueAllOfInformationFromJSON(json: any): LinkPreviewGithubIssueAllOfInformation {
|
||||
return LinkPreviewGithubIssueAllOfInformationFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function LinkPreviewGithubIssueAllOfInformationFromJSONTyped(json: any, ignoreDiscriminator: boolean): LinkPreviewGithubIssueAllOfInformation {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'url': !exists(json, 'url') ? undefined : json['url'],
|
||||
'number': !exists(json, 'number') ? undefined : json['number'],
|
||||
'title': !exists(json, 'title') ? undefined : json['title'],
|
||||
'user_login': !exists(json, 'user_login') ? undefined : json['user_login'],
|
||||
'state': !exists(json, 'state') ? undefined : json['state'],
|
||||
'state_reason': !exists(json, 'state_reason') ? undefined : json['state_reason'],
|
||||
'assignee_login': !exists(json, 'assignee_login') ? undefined : json['assignee_login'],
|
||||
'created_at': !exists(json, 'created_at') ? undefined : (new Date(json['created_at'])),
|
||||
'updated_at': !exists(json, 'updated_at') ? undefined : (new Date(json['updated_at'])),
|
||||
'closed_at': !exists(json, 'closed_at') ? undefined : (new Date(json['closed_at'])),
|
||||
'labels': !exists(json, 'labels') ? undefined : json['labels'],
|
||||
};
|
||||
}
|
||||
|
||||
export function LinkPreviewGithubIssueAllOfInformationToJSON(value?: LinkPreviewGithubIssueAllOfInformation | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'url': value.url,
|
||||
'number': value.number,
|
||||
'title': value.title,
|
||||
'user_login': value.user_login,
|
||||
'state': value.state,
|
||||
'state_reason': value.state_reason,
|
||||
'assignee_login': value.assignee_login,
|
||||
'created_at': value.created_at === undefined ? undefined : (value.created_at.toISOString().substring(0,10)),
|
||||
'updated_at': value.updated_at === undefined ? undefined : (value.updated_at.toISOString().substring(0,10)),
|
||||
'closed_at': value.closed_at === undefined ? undefined : (value.closed_at.toISOString().substring(0,10)),
|
||||
'labels': value.labels,
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,100 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* chomestatus API
|
||||
* The API for chromestatus.com. chromestatus.com is the official tool used for tracking feature launches in Blink (the browser engine that powers Chrome and many other web browsers). This tool guides feature owners through our launch process and serves as a primary source for developer information that then ripples throughout the web developer ecosystem. More details at: https://github.com/GoogleChrome/chromium-dashboard
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { LinkPreviewGithubMarkdownAllOfInformation } from './LinkPreviewGithubMarkdownAllOfInformation';
|
||||
import {
|
||||
LinkPreviewGithubMarkdownAllOfInformationFromJSON,
|
||||
LinkPreviewGithubMarkdownAllOfInformationFromJSONTyped,
|
||||
LinkPreviewGithubMarkdownAllOfInformationToJSON,
|
||||
} from './LinkPreviewGithubMarkdownAllOfInformation';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface LinkPreviewGithubMarkdown
|
||||
*/
|
||||
export interface LinkPreviewGithubMarkdown {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof LinkPreviewGithubMarkdown
|
||||
*/
|
||||
url: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof LinkPreviewGithubMarkdown
|
||||
*/
|
||||
type: string;
|
||||
/**
|
||||
*
|
||||
* @type {LinkPreviewGithubMarkdownAllOfInformation}
|
||||
* @memberof LinkPreviewGithubMarkdown
|
||||
*/
|
||||
information: LinkPreviewGithubMarkdownAllOfInformation;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof LinkPreviewGithubMarkdown
|
||||
*/
|
||||
http_error_code: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the LinkPreviewGithubMarkdown interface.
|
||||
*/
|
||||
export function instanceOfLinkPreviewGithubMarkdown(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "url" in value;
|
||||
isInstance = isInstance && "type" in value;
|
||||
isInstance = isInstance && "information" in value;
|
||||
isInstance = isInstance && "http_error_code" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function LinkPreviewGithubMarkdownFromJSON(json: any): LinkPreviewGithubMarkdown {
|
||||
return LinkPreviewGithubMarkdownFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function LinkPreviewGithubMarkdownFromJSONTyped(json: any, ignoreDiscriminator: boolean): LinkPreviewGithubMarkdown {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'url': json['url'],
|
||||
'type': json['type'],
|
||||
'information': LinkPreviewGithubMarkdownAllOfInformationFromJSON(json['information']),
|
||||
'http_error_code': json['http_error_code'],
|
||||
};
|
||||
}
|
||||
|
||||
export function LinkPreviewGithubMarkdownToJSON(value?: LinkPreviewGithubMarkdown | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'url': value.url,
|
||||
'type': value.type,
|
||||
'information': LinkPreviewGithubMarkdownAllOfInformationToJSON(value.information),
|
||||
'http_error_code': value.http_error_code,
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* chomestatus API
|
||||
* The API for chromestatus.com. chromestatus.com is the official tool used for tracking feature launches in Blink (the browser engine that powers Chrome and many other web browsers). This tool guides feature owners through our launch process and serves as a primary source for developer information that then ripples throughout the web developer ecosystem. More details at: https://github.com/GoogleChrome/chromium-dashboard
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface LinkPreviewGithubMarkdownAllOfInformation
|
||||
*/
|
||||
export interface LinkPreviewGithubMarkdownAllOfInformation {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof LinkPreviewGithubMarkdownAllOfInformation
|
||||
*/
|
||||
_parsed_title?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof LinkPreviewGithubMarkdownAllOfInformation
|
||||
*/
|
||||
content?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the LinkPreviewGithubMarkdownAllOfInformation interface.
|
||||
*/
|
||||
export function instanceOfLinkPreviewGithubMarkdownAllOfInformation(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function LinkPreviewGithubMarkdownAllOfInformationFromJSON(json: any): LinkPreviewGithubMarkdownAllOfInformation {
|
||||
return LinkPreviewGithubMarkdownAllOfInformationFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function LinkPreviewGithubMarkdownAllOfInformationFromJSONTyped(json: any, ignoreDiscriminator: boolean): LinkPreviewGithubMarkdownAllOfInformation {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'_parsed_title': !exists(json, '_parsed_title') ? undefined : json['_parsed_title'],
|
||||
'content': !exists(json, 'content') ? undefined : json['content'],
|
||||
};
|
||||
}
|
||||
|
||||
export function LinkPreviewGithubMarkdownAllOfInformationToJSON(value?: LinkPreviewGithubMarkdownAllOfInformation | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'_parsed_title': value._parsed_title,
|
||||
'content': value.content,
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,100 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* chomestatus API
|
||||
* The API for chromestatus.com. chromestatus.com is the official tool used for tracking feature launches in Blink (the browser engine that powers Chrome and many other web browsers). This tool guides feature owners through our launch process and serves as a primary source for developer information that then ripples throughout the web developer ecosystem. More details at: https://github.com/GoogleChrome/chromium-dashboard
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { LinkPreviewGithubIssueAllOfInformation } from './LinkPreviewGithubIssueAllOfInformation';
|
||||
import {
|
||||
LinkPreviewGithubIssueAllOfInformationFromJSON,
|
||||
LinkPreviewGithubIssueAllOfInformationFromJSONTyped,
|
||||
LinkPreviewGithubIssueAllOfInformationToJSON,
|
||||
} from './LinkPreviewGithubIssueAllOfInformation';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface LinkPreviewGithubPullRequest
|
||||
*/
|
||||
export interface LinkPreviewGithubPullRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof LinkPreviewGithubPullRequest
|
||||
*/
|
||||
url: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof LinkPreviewGithubPullRequest
|
||||
*/
|
||||
type: string;
|
||||
/**
|
||||
*
|
||||
* @type {LinkPreviewGithubIssueAllOfInformation}
|
||||
* @memberof LinkPreviewGithubPullRequest
|
||||
*/
|
||||
information: LinkPreviewGithubIssueAllOfInformation;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof LinkPreviewGithubPullRequest
|
||||
*/
|
||||
http_error_code: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the LinkPreviewGithubPullRequest interface.
|
||||
*/
|
||||
export function instanceOfLinkPreviewGithubPullRequest(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "url" in value;
|
||||
isInstance = isInstance && "type" in value;
|
||||
isInstance = isInstance && "information" in value;
|
||||
isInstance = isInstance && "http_error_code" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function LinkPreviewGithubPullRequestFromJSON(json: any): LinkPreviewGithubPullRequest {
|
||||
return LinkPreviewGithubPullRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function LinkPreviewGithubPullRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): LinkPreviewGithubPullRequest {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'url': json['url'],
|
||||
'type': json['type'],
|
||||
'information': LinkPreviewGithubIssueAllOfInformationFromJSON(json['information']),
|
||||
'http_error_code': json['http_error_code'],
|
||||
};
|
||||
}
|
||||
|
||||
export function LinkPreviewGithubPullRequestToJSON(value?: LinkPreviewGithubPullRequest | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'url': value.url,
|
||||
'type': value.type,
|
||||
'information': LinkPreviewGithubIssueAllOfInformationToJSON(value.information),
|
||||
'http_error_code': value.http_error_code,
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,100 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* chomestatus API
|
||||
* The API for chromestatus.com. chromestatus.com is the official tool used for tracking feature launches in Blink (the browser engine that powers Chrome and many other web browsers). This tool guides feature owners through our launch process and serves as a primary source for developer information that then ripples throughout the web developer ecosystem. More details at: https://github.com/GoogleChrome/chromium-dashboard
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { LinkPreviewOpenGraphAllOfInformation } from './LinkPreviewOpenGraphAllOfInformation';
|
||||
import {
|
||||
LinkPreviewOpenGraphAllOfInformationFromJSON,
|
||||
LinkPreviewOpenGraphAllOfInformationFromJSONTyped,
|
||||
LinkPreviewOpenGraphAllOfInformationToJSON,
|
||||
} from './LinkPreviewOpenGraphAllOfInformation';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface LinkPreviewGoogleDocs
|
||||
*/
|
||||
export interface LinkPreviewGoogleDocs {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof LinkPreviewGoogleDocs
|
||||
*/
|
||||
url: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof LinkPreviewGoogleDocs
|
||||
*/
|
||||
type: string;
|
||||
/**
|
||||
*
|
||||
* @type {LinkPreviewOpenGraphAllOfInformation}
|
||||
* @memberof LinkPreviewGoogleDocs
|
||||
*/
|
||||
information: LinkPreviewOpenGraphAllOfInformation;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof LinkPreviewGoogleDocs
|
||||
*/
|
||||
http_error_code: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the LinkPreviewGoogleDocs interface.
|
||||
*/
|
||||
export function instanceOfLinkPreviewGoogleDocs(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "url" in value;
|
||||
isInstance = isInstance && "type" in value;
|
||||
isInstance = isInstance && "information" in value;
|
||||
isInstance = isInstance && "http_error_code" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function LinkPreviewGoogleDocsFromJSON(json: any): LinkPreviewGoogleDocs {
|
||||
return LinkPreviewGoogleDocsFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function LinkPreviewGoogleDocsFromJSONTyped(json: any, ignoreDiscriminator: boolean): LinkPreviewGoogleDocs {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'url': json['url'],
|
||||
'type': json['type'],
|
||||
'information': LinkPreviewOpenGraphAllOfInformationFromJSON(json['information']),
|
||||
'http_error_code': json['http_error_code'],
|
||||
};
|
||||
}
|
||||
|
||||
export function LinkPreviewGoogleDocsToJSON(value?: LinkPreviewGoogleDocs | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'url': value.url,
|
||||
'type': value.type,
|
||||
'information': LinkPreviewOpenGraphAllOfInformationToJSON(value.information),
|
||||
'http_error_code': value.http_error_code,
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,100 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* chomestatus API
|
||||
* The API for chromestatus.com. chromestatus.com is the official tool used for tracking feature launches in Blink (the browser engine that powers Chrome and many other web browsers). This tool guides feature owners through our launch process and serves as a primary source for developer information that then ripples throughout the web developer ecosystem. More details at: https://github.com/GoogleChrome/chromium-dashboard
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { LinkPreviewOpenGraphAllOfInformation } from './LinkPreviewOpenGraphAllOfInformation';
|
||||
import {
|
||||
LinkPreviewOpenGraphAllOfInformationFromJSON,
|
||||
LinkPreviewOpenGraphAllOfInformationFromJSONTyped,
|
||||
LinkPreviewOpenGraphAllOfInformationToJSON,
|
||||
} from './LinkPreviewOpenGraphAllOfInformation';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface LinkPreviewMdnDocs
|
||||
*/
|
||||
export interface LinkPreviewMdnDocs {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof LinkPreviewMdnDocs
|
||||
*/
|
||||
url: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof LinkPreviewMdnDocs
|
||||
*/
|
||||
type: string;
|
||||
/**
|
||||
*
|
||||
* @type {LinkPreviewOpenGraphAllOfInformation}
|
||||
* @memberof LinkPreviewMdnDocs
|
||||
*/
|
||||
information: LinkPreviewOpenGraphAllOfInformation;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof LinkPreviewMdnDocs
|
||||
*/
|
||||
http_error_code: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the LinkPreviewMdnDocs interface.
|
||||
*/
|
||||
export function instanceOfLinkPreviewMdnDocs(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "url" in value;
|
||||
isInstance = isInstance && "type" in value;
|
||||
isInstance = isInstance && "information" in value;
|
||||
isInstance = isInstance && "http_error_code" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function LinkPreviewMdnDocsFromJSON(json: any): LinkPreviewMdnDocs {
|
||||
return LinkPreviewMdnDocsFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function LinkPreviewMdnDocsFromJSONTyped(json: any, ignoreDiscriminator: boolean): LinkPreviewMdnDocs {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'url': json['url'],
|
||||
'type': json['type'],
|
||||
'information': LinkPreviewOpenGraphAllOfInformationFromJSON(json['information']),
|
||||
'http_error_code': json['http_error_code'],
|
||||
};
|
||||
}
|
||||
|
||||
export function LinkPreviewMdnDocsToJSON(value?: LinkPreviewMdnDocs | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'url': value.url,
|
||||
'type': value.type,
|
||||
'information': LinkPreviewOpenGraphAllOfInformationToJSON(value.information),
|
||||
'http_error_code': value.http_error_code,
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,100 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* chomestatus API
|
||||
* The API for chromestatus.com. chromestatus.com is the official tool used for tracking feature launches in Blink (the browser engine that powers Chrome and many other web browsers). This tool guides feature owners through our launch process and serves as a primary source for developer information that then ripples throughout the web developer ecosystem. More details at: https://github.com/GoogleChrome/chromium-dashboard
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { LinkPreviewOpenGraphAllOfInformation } from './LinkPreviewOpenGraphAllOfInformation';
|
||||
import {
|
||||
LinkPreviewOpenGraphAllOfInformationFromJSON,
|
||||
LinkPreviewOpenGraphAllOfInformationFromJSONTyped,
|
||||
LinkPreviewOpenGraphAllOfInformationToJSON,
|
||||
} from './LinkPreviewOpenGraphAllOfInformation';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface LinkPreviewMozillaBug
|
||||
*/
|
||||
export interface LinkPreviewMozillaBug {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof LinkPreviewMozillaBug
|
||||
*/
|
||||
url: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof LinkPreviewMozillaBug
|
||||
*/
|
||||
type: string;
|
||||
/**
|
||||
*
|
||||
* @type {LinkPreviewOpenGraphAllOfInformation}
|
||||
* @memberof LinkPreviewMozillaBug
|
||||
*/
|
||||
information: LinkPreviewOpenGraphAllOfInformation;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof LinkPreviewMozillaBug
|
||||
*/
|
||||
http_error_code: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the LinkPreviewMozillaBug interface.
|
||||
*/
|
||||
export function instanceOfLinkPreviewMozillaBug(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "url" in value;
|
||||
isInstance = isInstance && "type" in value;
|
||||
isInstance = isInstance && "information" in value;
|
||||
isInstance = isInstance && "http_error_code" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function LinkPreviewMozillaBugFromJSON(json: any): LinkPreviewMozillaBug {
|
||||
return LinkPreviewMozillaBugFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function LinkPreviewMozillaBugFromJSONTyped(json: any, ignoreDiscriminator: boolean): LinkPreviewMozillaBug {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'url': json['url'],
|
||||
'type': json['type'],
|
||||
'information': LinkPreviewOpenGraphAllOfInformationFromJSON(json['information']),
|
||||
'http_error_code': json['http_error_code'],
|
||||
};
|
||||
}
|
||||
|
||||
export function LinkPreviewMozillaBugToJSON(value?: LinkPreviewMozillaBug | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'url': value.url,
|
||||
'type': value.type,
|
||||
'information': LinkPreviewOpenGraphAllOfInformationToJSON(value.information),
|
||||
'http_error_code': value.http_error_code,
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,100 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* chomestatus API
|
||||
* The API for chromestatus.com. chromestatus.com is the official tool used for tracking feature launches in Blink (the browser engine that powers Chrome and many other web browsers). This tool guides feature owners through our launch process and serves as a primary source for developer information that then ripples throughout the web developer ecosystem. More details at: https://github.com/GoogleChrome/chromium-dashboard
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { LinkPreviewOpenGraphAllOfInformation } from './LinkPreviewOpenGraphAllOfInformation';
|
||||
import {
|
||||
LinkPreviewOpenGraphAllOfInformationFromJSON,
|
||||
LinkPreviewOpenGraphAllOfInformationFromJSONTyped,
|
||||
LinkPreviewOpenGraphAllOfInformationToJSON,
|
||||
} from './LinkPreviewOpenGraphAllOfInformation';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface LinkPreviewOpenGraph
|
||||
*/
|
||||
export interface LinkPreviewOpenGraph {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof LinkPreviewOpenGraph
|
||||
*/
|
||||
url: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof LinkPreviewOpenGraph
|
||||
*/
|
||||
type: string;
|
||||
/**
|
||||
*
|
||||
* @type {LinkPreviewOpenGraphAllOfInformation}
|
||||
* @memberof LinkPreviewOpenGraph
|
||||
*/
|
||||
information: LinkPreviewOpenGraphAllOfInformation;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof LinkPreviewOpenGraph
|
||||
*/
|
||||
http_error_code: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the LinkPreviewOpenGraph interface.
|
||||
*/
|
||||
export function instanceOfLinkPreviewOpenGraph(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "url" in value;
|
||||
isInstance = isInstance && "type" in value;
|
||||
isInstance = isInstance && "information" in value;
|
||||
isInstance = isInstance && "http_error_code" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function LinkPreviewOpenGraphFromJSON(json: any): LinkPreviewOpenGraph {
|
||||
return LinkPreviewOpenGraphFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function LinkPreviewOpenGraphFromJSONTyped(json: any, ignoreDiscriminator: boolean): LinkPreviewOpenGraph {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'url': json['url'],
|
||||
'type': json['type'],
|
||||
'information': LinkPreviewOpenGraphAllOfInformationFromJSON(json['information']),
|
||||
'http_error_code': json['http_error_code'],
|
||||
};
|
||||
}
|
||||
|
||||
export function LinkPreviewOpenGraphToJSON(value?: LinkPreviewOpenGraph | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'url': value.url,
|
||||
'type': value.type,
|
||||
'information': LinkPreviewOpenGraphAllOfInformationToJSON(value.information),
|
||||
'http_error_code': value.http_error_code,
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* chomestatus API
|
||||
* The API for chromestatus.com. chromestatus.com is the official tool used for tracking feature launches in Blink (the browser engine that powers Chrome and many other web browsers). This tool guides feature owners through our launch process and serves as a primary source for developer information that then ripples throughout the web developer ecosystem. More details at: https://github.com/GoogleChrome/chromium-dashboard
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface LinkPreviewOpenGraphAllOfInformation
|
||||
*/
|
||||
export interface LinkPreviewOpenGraphAllOfInformation {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof LinkPreviewOpenGraphAllOfInformation
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof LinkPreviewOpenGraphAllOfInformation
|
||||
*/
|
||||
description?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the LinkPreviewOpenGraphAllOfInformation interface.
|
||||
*/
|
||||
export function instanceOfLinkPreviewOpenGraphAllOfInformation(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function LinkPreviewOpenGraphAllOfInformationFromJSON(json: any): LinkPreviewOpenGraphAllOfInformation {
|
||||
return LinkPreviewOpenGraphAllOfInformationFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function LinkPreviewOpenGraphAllOfInformationFromJSONTyped(json: any, ignoreDiscriminator: boolean): LinkPreviewOpenGraphAllOfInformation {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'title': !exists(json, 'title') ? undefined : json['title'],
|
||||
'description': !exists(json, 'description') ? undefined : json['description'],
|
||||
};
|
||||
}
|
||||
|
||||
export function LinkPreviewOpenGraphAllOfInformationToJSON(value?: LinkPreviewOpenGraphAllOfInformation | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'title': value.title,
|
||||
'description': value.description,
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,100 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* chomestatus API
|
||||
* The API for chromestatus.com. chromestatus.com is the official tool used for tracking feature launches in Blink (the browser engine that powers Chrome and many other web browsers). This tool guides feature owners through our launch process and serves as a primary source for developer information that then ripples throughout the web developer ecosystem. More details at: https://github.com/GoogleChrome/chromium-dashboard
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { LinkPreviewOpenGraphAllOfInformation } from './LinkPreviewOpenGraphAllOfInformation';
|
||||
import {
|
||||
LinkPreviewOpenGraphAllOfInformationFromJSON,
|
||||
LinkPreviewOpenGraphAllOfInformationFromJSONTyped,
|
||||
LinkPreviewOpenGraphAllOfInformationToJSON,
|
||||
} from './LinkPreviewOpenGraphAllOfInformation';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface LinkPreviewSpecs
|
||||
*/
|
||||
export interface LinkPreviewSpecs {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof LinkPreviewSpecs
|
||||
*/
|
||||
url: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof LinkPreviewSpecs
|
||||
*/
|
||||
type: string;
|
||||
/**
|
||||
*
|
||||
* @type {LinkPreviewOpenGraphAllOfInformation}
|
||||
* @memberof LinkPreviewSpecs
|
||||
*/
|
||||
information: LinkPreviewOpenGraphAllOfInformation;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof LinkPreviewSpecs
|
||||
*/
|
||||
http_error_code: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the LinkPreviewSpecs interface.
|
||||
*/
|
||||
export function instanceOfLinkPreviewSpecs(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "url" in value;
|
||||
isInstance = isInstance && "type" in value;
|
||||
isInstance = isInstance && "information" in value;
|
||||
isInstance = isInstance && "http_error_code" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function LinkPreviewSpecsFromJSON(json: any): LinkPreviewSpecs {
|
||||
return LinkPreviewSpecsFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function LinkPreviewSpecsFromJSONTyped(json: any, ignoreDiscriminator: boolean): LinkPreviewSpecs {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'url': json['url'],
|
||||
'type': json['type'],
|
||||
'information': LinkPreviewOpenGraphAllOfInformationFromJSON(json['information']),
|
||||
'http_error_code': json['http_error_code'],
|
||||
};
|
||||
}
|
||||
|
||||
export function LinkPreviewSpecsToJSON(value?: LinkPreviewSpecs | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'url': value.url,
|
||||
'type': value.type,
|
||||
'information': LinkPreviewOpenGraphAllOfInformationToJSON(value.information),
|
||||
'http_error_code': value.http_error_code,
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,100 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* chomestatus API
|
||||
* The API for chromestatus.com. chromestatus.com is the official tool used for tracking feature launches in Blink (the browser engine that powers Chrome and many other web browsers). This tool guides feature owners through our launch process and serves as a primary source for developer information that then ripples throughout the web developer ecosystem. More details at: https://github.com/GoogleChrome/chromium-dashboard
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { LinkPreviewOpenGraphAllOfInformation } from './LinkPreviewOpenGraphAllOfInformation';
|
||||
import {
|
||||
LinkPreviewOpenGraphAllOfInformationFromJSON,
|
||||
LinkPreviewOpenGraphAllOfInformationFromJSONTyped,
|
||||
LinkPreviewOpenGraphAllOfInformationToJSON,
|
||||
} from './LinkPreviewOpenGraphAllOfInformation';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface LinkPreviewWebkitBug
|
||||
*/
|
||||
export interface LinkPreviewWebkitBug {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof LinkPreviewWebkitBug
|
||||
*/
|
||||
url: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof LinkPreviewWebkitBug
|
||||
*/
|
||||
type: string;
|
||||
/**
|
||||
*
|
||||
* @type {LinkPreviewOpenGraphAllOfInformation}
|
||||
* @memberof LinkPreviewWebkitBug
|
||||
*/
|
||||
information: LinkPreviewOpenGraphAllOfInformation;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof LinkPreviewWebkitBug
|
||||
*/
|
||||
http_error_code: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the LinkPreviewWebkitBug interface.
|
||||
*/
|
||||
export function instanceOfLinkPreviewWebkitBug(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "url" in value;
|
||||
isInstance = isInstance && "type" in value;
|
||||
isInstance = isInstance && "information" in value;
|
||||
isInstance = isInstance && "http_error_code" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function LinkPreviewWebkitBugFromJSON(json: any): LinkPreviewWebkitBug {
|
||||
return LinkPreviewWebkitBugFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function LinkPreviewWebkitBugFromJSONTyped(json: any, ignoreDiscriminator: boolean): LinkPreviewWebkitBug {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'url': json['url'],
|
||||
'type': json['type'],
|
||||
'information': LinkPreviewOpenGraphAllOfInformationFromJSON(json['information']),
|
||||
'http_error_code': json['http_error_code'],
|
||||
};
|
||||
}
|
||||
|
||||
export function LinkPreviewWebkitBugToJSON(value?: LinkPreviewWebkitBug | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'url': value.url,
|
||||
'type': value.type,
|
||||
'information': LinkPreviewOpenGraphAllOfInformationToJSON(value.information),
|
||||
'http_error_code': value.http_error_code,
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,131 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* chomestatus API
|
||||
* The API for chromestatus.com. chromestatus.com is the official tool used for tracking feature launches in Blink (the browser engine that powers Chrome and many other web browsers). This tool guides feature owners through our launch process and serves as a primary source for developer information that then ripples throughout the web developer ecosystem. More details at: https://github.com/GoogleChrome/chromium-dashboard
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { FeatureLink } from './FeatureLink';
|
||||
import {
|
||||
FeatureLinkFromJSON,
|
||||
FeatureLinkFromJSONTyped,
|
||||
FeatureLinkToJSON,
|
||||
} from './FeatureLink';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface OutstandingReview
|
||||
*/
|
||||
export interface OutstandingReview {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OutstandingReview
|
||||
*/
|
||||
review_link: string;
|
||||
/**
|
||||
*
|
||||
* @type {FeatureLink}
|
||||
* @memberof OutstandingReview
|
||||
*/
|
||||
feature: FeatureLink;
|
||||
/**
|
||||
* The development stage that the feature has reached:
|
||||
* - [`incubating`](https://www.chromium.org/blink/launching-features/#start-incubating)
|
||||
* - [`prototyping`](https://www.chromium.org/blink/launching-features/#prototyping)
|
||||
* - [`dev-trial`](https://www.chromium.org/blink/launching-features/#dev-trials)
|
||||
* - [`wide-review`](https://www.chromium.org/blink/launching-features/#widen-review)
|
||||
* - [`origin-trial`](https://www.chromium.org/blink/launching-features/#origin-trials)
|
||||
* - [`shipping`](https://www.chromium.org/blink/launching-features/#new-feature-prepare-to-ship)
|
||||
* - `shipped` - The feature is enabled by default in Chromium.
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof OutstandingReview
|
||||
*/
|
||||
current_stage: OutstandingReviewCurrentStageEnum;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OutstandingReview
|
||||
*/
|
||||
estimated_start_milestone?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof OutstandingReview
|
||||
*/
|
||||
estimated_end_milestone?: number;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const OutstandingReviewCurrentStageEnum = {
|
||||
incubating: 'incubating',
|
||||
prototyping: 'prototyping',
|
||||
dev_trial: 'dev-trial',
|
||||
wide_review: 'wide-review',
|
||||
origin_trial: 'origin-trial',
|
||||
shipping: 'shipping',
|
||||
shipped: 'shipped'
|
||||
} as const;
|
||||
export type OutstandingReviewCurrentStageEnum = typeof OutstandingReviewCurrentStageEnum[keyof typeof OutstandingReviewCurrentStageEnum];
|
||||
|
||||
|
||||
/**
|
||||
* Check if a given object implements the OutstandingReview interface.
|
||||
*/
|
||||
export function instanceOfOutstandingReview(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "review_link" in value;
|
||||
isInstance = isInstance && "feature" in value;
|
||||
isInstance = isInstance && "current_stage" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function OutstandingReviewFromJSON(json: any): OutstandingReview {
|
||||
return OutstandingReviewFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function OutstandingReviewFromJSONTyped(json: any, ignoreDiscriminator: boolean): OutstandingReview {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'review_link': json['review_link'],
|
||||
'feature': FeatureLinkFromJSON(json['feature']),
|
||||
'current_stage': json['current_stage'],
|
||||
'estimated_start_milestone': !exists(json, 'estimated_start_milestone') ? undefined : json['estimated_start_milestone'],
|
||||
'estimated_end_milestone': !exists(json, 'estimated_end_milestone') ? undefined : json['estimated_end_milestone'],
|
||||
};
|
||||
}
|
||||
|
||||
export function OutstandingReviewToJSON(value?: OutstandingReview | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'review_link': value.review_link,
|
||||
'feature': FeatureLinkToJSON(value.feature),
|
||||
'current_stage': value.current_stage,
|
||||
'estimated_start_milestone': value.estimated_start_milestone,
|
||||
'estimated_end_milestone': value.estimated_end_milestone,
|
||||
};
|
||||
}
|
||||
|
|
@ -3,9 +3,25 @@
|
|||
export * from './ComponentUsersRequest';
|
||||
export * from './ComponentsUser';
|
||||
export * from './ComponentsUsersResponse';
|
||||
export * from './ExternalReviewsResponse';
|
||||
export * from './FeatureLatency';
|
||||
export * from './FeatureLink';
|
||||
export * from './GateLatency';
|
||||
export * from './LinkPreview';
|
||||
export * from './LinkPreviewBase';
|
||||
export * from './LinkPreviewGithubIssue';
|
||||
export * from './LinkPreviewGithubIssueAllOfInformation';
|
||||
export * from './LinkPreviewGithubMarkdown';
|
||||
export * from './LinkPreviewGithubMarkdownAllOfInformation';
|
||||
export * from './LinkPreviewGithubPullRequest';
|
||||
export * from './LinkPreviewGoogleDocs';
|
||||
export * from './LinkPreviewMdnDocs';
|
||||
export * from './LinkPreviewMozillaBug';
|
||||
export * from './LinkPreviewOpenGraph';
|
||||
export * from './LinkPreviewOpenGraphAllOfInformation';
|
||||
export * from './LinkPreviewSpecs';
|
||||
export * from './LinkPreviewWebkitBug';
|
||||
export * from './OutstandingReview';
|
||||
export * from './OwnersAndSubscribersOfComponent';
|
||||
export * from './ReviewLatency';
|
||||
export * from './SpecMentor';
|
||||
|
|
|
@ -15,9 +15,25 @@ chromestatus_openapi/models/base_model.py
|
|||
chromestatus_openapi/models/component_users_request.py
|
||||
chromestatus_openapi/models/components_user.py
|
||||
chromestatus_openapi/models/components_users_response.py
|
||||
chromestatus_openapi/models/external_reviews_response.py
|
||||
chromestatus_openapi/models/feature_latency.py
|
||||
chromestatus_openapi/models/feature_link.py
|
||||
chromestatus_openapi/models/gate_latency.py
|
||||
chromestatus_openapi/models/link_preview.py
|
||||
chromestatus_openapi/models/link_preview_base.py
|
||||
chromestatus_openapi/models/link_preview_github_issue.py
|
||||
chromestatus_openapi/models/link_preview_github_issue_all_of_information.py
|
||||
chromestatus_openapi/models/link_preview_github_markdown.py
|
||||
chromestatus_openapi/models/link_preview_github_markdown_all_of_information.py
|
||||
chromestatus_openapi/models/link_preview_github_pull_request.py
|
||||
chromestatus_openapi/models/link_preview_google_docs.py
|
||||
chromestatus_openapi/models/link_preview_mdn_docs.py
|
||||
chromestatus_openapi/models/link_preview_mozilla_bug.py
|
||||
chromestatus_openapi/models/link_preview_open_graph.py
|
||||
chromestatus_openapi/models/link_preview_open_graph_all_of_information.py
|
||||
chromestatus_openapi/models/link_preview_specs.py
|
||||
chromestatus_openapi/models/link_preview_webkit_bug.py
|
||||
chromestatus_openapi/models/outstanding_review.py
|
||||
chromestatus_openapi/models/owners_and_subscribers_of_component.py
|
||||
chromestatus_openapi/models/review_latency.py
|
||||
chromestatus_openapi/models/spec_mentor.py
|
||||
|
|
|
@ -5,6 +5,7 @@ from typing import Union
|
|||
|
||||
from chromestatus_openapi.models.component_users_request import ComponentUsersRequest # noqa: E501
|
||||
from chromestatus_openapi.models.components_users_response import ComponentsUsersResponse # noqa: E501
|
||||
from chromestatus_openapi.models.external_reviews_response import ExternalReviewsResponse # noqa: E501
|
||||
from chromestatus_openapi.models.feature_latency import FeatureLatency # noqa: E501
|
||||
from chromestatus_openapi.models.review_latency import ReviewLatency # noqa: E501
|
||||
from chromestatus_openapi.models.spec_mentor import SpecMentor # noqa: E501
|
||||
|
@ -41,6 +42,19 @@ def list_component_users(): # noqa: E501
|
|||
return 'do some magic!'
|
||||
|
||||
|
||||
def list_external_reviews(review_group): # noqa: E501
|
||||
"""List features whose external reviews are incomplete
|
||||
|
||||
# noqa: E501
|
||||
|
||||
:param review_group: Which review group to focus on: * `tag` - The W3C TAG * `gecko` - The rendering engine that powers Mozilla Firefox * `webkit` - The rendering engine that powers Apple Safari
|
||||
:type review_group: str
|
||||
|
||||
:rtype: Union[ExternalReviewsResponse, Tuple[ExternalReviewsResponse, int], Tuple[ExternalReviewsResponse, int, Dict[str, str]]
|
||||
"""
|
||||
return 'do some magic!'
|
||||
|
||||
|
||||
def list_feature_latency(start_at, end_at): # noqa: E501
|
||||
"""List how long each feature took to launch
|
||||
|
||||
|
|
|
@ -3,9 +3,25 @@
|
|||
from chromestatus_openapi.models.component_users_request import ComponentUsersRequest
|
||||
from chromestatus_openapi.models.components_user import ComponentsUser
|
||||
from chromestatus_openapi.models.components_users_response import ComponentsUsersResponse
|
||||
from chromestatus_openapi.models.external_reviews_response import ExternalReviewsResponse
|
||||
from chromestatus_openapi.models.feature_latency import FeatureLatency
|
||||
from chromestatus_openapi.models.feature_link import FeatureLink
|
||||
from chromestatus_openapi.models.gate_latency import GateLatency
|
||||
from chromestatus_openapi.models.link_preview import LinkPreview
|
||||
from chromestatus_openapi.models.link_preview_base import LinkPreviewBase
|
||||
from chromestatus_openapi.models.link_preview_github_issue import LinkPreviewGithubIssue
|
||||
from chromestatus_openapi.models.link_preview_github_issue_all_of_information import LinkPreviewGithubIssueAllOfInformation
|
||||
from chromestatus_openapi.models.link_preview_github_markdown import LinkPreviewGithubMarkdown
|
||||
from chromestatus_openapi.models.link_preview_github_markdown_all_of_information import LinkPreviewGithubMarkdownAllOfInformation
|
||||
from chromestatus_openapi.models.link_preview_github_pull_request import LinkPreviewGithubPullRequest
|
||||
from chromestatus_openapi.models.link_preview_google_docs import LinkPreviewGoogleDocs
|
||||
from chromestatus_openapi.models.link_preview_mdn_docs import LinkPreviewMdnDocs
|
||||
from chromestatus_openapi.models.link_preview_mozilla_bug import LinkPreviewMozillaBug
|
||||
from chromestatus_openapi.models.link_preview_open_graph import LinkPreviewOpenGraph
|
||||
from chromestatus_openapi.models.link_preview_open_graph_all_of_information import LinkPreviewOpenGraphAllOfInformation
|
||||
from chromestatus_openapi.models.link_preview_specs import LinkPreviewSpecs
|
||||
from chromestatus_openapi.models.link_preview_webkit_bug import LinkPreviewWebkitBug
|
||||
from chromestatus_openapi.models.outstanding_review import OutstandingReview
|
||||
from chromestatus_openapi.models.owners_and_subscribers_of_component import OwnersAndSubscribersOfComponent
|
||||
from chromestatus_openapi.models.review_latency import ReviewLatency
|
||||
from chromestatus_openapi.models.spec_mentor import SpecMentor
|
||||
|
|
|
@ -0,0 +1,95 @@
|
|||
from datetime import date, datetime # noqa: F401
|
||||
|
||||
from typing import List, Dict # noqa: F401
|
||||
|
||||
from chromestatus_openapi.models.base_model import Model
|
||||
from chromestatus_openapi.models.link_preview import LinkPreview
|
||||
from chromestatus_openapi.models.outstanding_review import OutstandingReview
|
||||
from chromestatus_openapi import util
|
||||
|
||||
from chromestatus_openapi.models.link_preview import LinkPreview # noqa: E501
|
||||
from chromestatus_openapi.models.outstanding_review import OutstandingReview # noqa: E501
|
||||
|
||||
class ExternalReviewsResponse(Model):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self, reviews=None, link_previews=None): # noqa: E501
|
||||
"""ExternalReviewsResponse - a model defined in OpenAPI
|
||||
|
||||
:param reviews: The reviews of this ExternalReviewsResponse. # noqa: E501
|
||||
:type reviews: List[OutstandingReview]
|
||||
:param link_previews: The link_previews of this ExternalReviewsResponse. # noqa: E501
|
||||
:type link_previews: List[LinkPreview]
|
||||
"""
|
||||
self.openapi_types = {
|
||||
'reviews': List[OutstandingReview],
|
||||
'link_previews': List[LinkPreview]
|
||||
}
|
||||
|
||||
self.attribute_map = {
|
||||
'reviews': 'reviews',
|
||||
'link_previews': 'link_previews'
|
||||
}
|
||||
|
||||
self._reviews = reviews
|
||||
self._link_previews = link_previews
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, dikt) -> 'ExternalReviewsResponse':
|
||||
"""Returns the dict as a model
|
||||
|
||||
:param dikt: A dict.
|
||||
:type: dict
|
||||
:return: The ExternalReviewsResponse of this ExternalReviewsResponse. # noqa: E501
|
||||
:rtype: ExternalReviewsResponse
|
||||
"""
|
||||
return util.deserialize_model(dikt, cls)
|
||||
|
||||
@property
|
||||
def reviews(self) -> List[OutstandingReview]:
|
||||
"""Gets the reviews of this ExternalReviewsResponse.
|
||||
|
||||
|
||||
:return: The reviews of this ExternalReviewsResponse.
|
||||
:rtype: List[OutstandingReview]
|
||||
"""
|
||||
return self._reviews
|
||||
|
||||
@reviews.setter
|
||||
def reviews(self, reviews: List[OutstandingReview]):
|
||||
"""Sets the reviews of this ExternalReviewsResponse.
|
||||
|
||||
|
||||
:param reviews: The reviews of this ExternalReviewsResponse.
|
||||
:type reviews: List[OutstandingReview]
|
||||
"""
|
||||
if reviews is None:
|
||||
raise ValueError("Invalid value for `reviews`, must not be `None`") # noqa: E501
|
||||
|
||||
self._reviews = reviews
|
||||
|
||||
@property
|
||||
def link_previews(self) -> List[LinkPreview]:
|
||||
"""Gets the link_previews of this ExternalReviewsResponse.
|
||||
|
||||
|
||||
:return: The link_previews of this ExternalReviewsResponse.
|
||||
:rtype: List[LinkPreview]
|
||||
"""
|
||||
return self._link_previews
|
||||
|
||||
@link_previews.setter
|
||||
def link_previews(self, link_previews: List[LinkPreview]):
|
||||
"""Sets the link_previews of this ExternalReviewsResponse.
|
||||
|
||||
|
||||
:param link_previews: The link_previews of this ExternalReviewsResponse.
|
||||
:type link_previews: List[LinkPreview]
|
||||
"""
|
||||
if link_previews is None:
|
||||
raise ValueError("Invalid value for `link_previews`, must not be `None`") # noqa: E501
|
||||
|
||||
self._link_previews = link_previews
|
|
@ -0,0 +1,147 @@
|
|||
from datetime import date, datetime # noqa: F401
|
||||
|
||||
from typing import List, Dict # noqa: F401
|
||||
|
||||
from chromestatus_openapi.models.base_model import Model
|
||||
from chromestatus_openapi import util
|
||||
|
||||
|
||||
class LinkPreview(Model):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self, url=None, type=None, information=None, http_error_code=None): # noqa: E501
|
||||
"""LinkPreview - a model defined in OpenAPI
|
||||
|
||||
:param url: The url of this LinkPreview. # noqa: E501
|
||||
:type url: str
|
||||
:param type: The type of this LinkPreview. # noqa: E501
|
||||
:type type: str
|
||||
:param information: The information of this LinkPreview. # noqa: E501
|
||||
:type information: object
|
||||
:param http_error_code: The http_error_code of this LinkPreview. # noqa: E501
|
||||
:type http_error_code: int
|
||||
"""
|
||||
self.openapi_types = {
|
||||
'url': str,
|
||||
'type': str,
|
||||
'information': object,
|
||||
'http_error_code': int
|
||||
}
|
||||
|
||||
self.attribute_map = {
|
||||
'url': 'url',
|
||||
'type': 'type',
|
||||
'information': 'information',
|
||||
'http_error_code': 'http_error_code'
|
||||
}
|
||||
|
||||
self._url = url
|
||||
self._type = type
|
||||
self._information = information
|
||||
self._http_error_code = http_error_code
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, dikt) -> 'LinkPreview':
|
||||
"""Returns the dict as a model
|
||||
|
||||
:param dikt: A dict.
|
||||
:type: dict
|
||||
:return: The LinkPreview of this LinkPreview. # noqa: E501
|
||||
:rtype: LinkPreview
|
||||
"""
|
||||
return util.deserialize_model(dikt, cls)
|
||||
|
||||
@property
|
||||
def url(self) -> str:
|
||||
"""Gets the url of this LinkPreview.
|
||||
|
||||
|
||||
:return: The url of this LinkPreview.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._url
|
||||
|
||||
@url.setter
|
||||
def url(self, url: str):
|
||||
"""Sets the url of this LinkPreview.
|
||||
|
||||
|
||||
:param url: The url of this LinkPreview.
|
||||
:type url: str
|
||||
"""
|
||||
if url is None:
|
||||
raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501
|
||||
|
||||
self._url = url
|
||||
|
||||
@property
|
||||
def type(self) -> str:
|
||||
"""Gets the type of this LinkPreview.
|
||||
|
||||
|
||||
:return: The type of this LinkPreview.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._type
|
||||
|
||||
@type.setter
|
||||
def type(self, type: str):
|
||||
"""Sets the type of this LinkPreview.
|
||||
|
||||
|
||||
:param type: The type of this LinkPreview.
|
||||
:type type: str
|
||||
"""
|
||||
if type is None:
|
||||
raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501
|
||||
|
||||
self._type = type
|
||||
|
||||
@property
|
||||
def information(self) -> object:
|
||||
"""Gets the information of this LinkPreview.
|
||||
|
||||
|
||||
:return: The information of this LinkPreview.
|
||||
:rtype: object
|
||||
"""
|
||||
return self._information
|
||||
|
||||
@information.setter
|
||||
def information(self, information: object):
|
||||
"""Sets the information of this LinkPreview.
|
||||
|
||||
|
||||
:param information: The information of this LinkPreview.
|
||||
:type information: object
|
||||
"""
|
||||
if information is None:
|
||||
raise ValueError("Invalid value for `information`, must not be `None`") # noqa: E501
|
||||
|
||||
self._information = information
|
||||
|
||||
@property
|
||||
def http_error_code(self) -> int:
|
||||
"""Gets the http_error_code of this LinkPreview.
|
||||
|
||||
|
||||
:return: The http_error_code of this LinkPreview.
|
||||
:rtype: int
|
||||
"""
|
||||
return self._http_error_code
|
||||
|
||||
@http_error_code.setter
|
||||
def http_error_code(self, http_error_code: int):
|
||||
"""Sets the http_error_code of this LinkPreview.
|
||||
|
||||
|
||||
:param http_error_code: The http_error_code of this LinkPreview.
|
||||
:type http_error_code: int
|
||||
"""
|
||||
if http_error_code is None:
|
||||
raise ValueError("Invalid value for `http_error_code`, must not be `None`") # noqa: E501
|
||||
|
||||
self._http_error_code = http_error_code
|
|
@ -0,0 +1,147 @@
|
|||
from datetime import date, datetime # noqa: F401
|
||||
|
||||
from typing import List, Dict # noqa: F401
|
||||
|
||||
from chromestatus_openapi.models.base_model import Model
|
||||
from chromestatus_openapi import util
|
||||
|
||||
|
||||
class LinkPreviewBase(Model):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self, url=None, type=None, information=None, http_error_code=None): # noqa: E501
|
||||
"""LinkPreviewBase - a model defined in OpenAPI
|
||||
|
||||
:param url: The url of this LinkPreviewBase. # noqa: E501
|
||||
:type url: str
|
||||
:param type: The type of this LinkPreviewBase. # noqa: E501
|
||||
:type type: str
|
||||
:param information: The information of this LinkPreviewBase. # noqa: E501
|
||||
:type information: object
|
||||
:param http_error_code: The http_error_code of this LinkPreviewBase. # noqa: E501
|
||||
:type http_error_code: int
|
||||
"""
|
||||
self.openapi_types = {
|
||||
'url': str,
|
||||
'type': str,
|
||||
'information': object,
|
||||
'http_error_code': int
|
||||
}
|
||||
|
||||
self.attribute_map = {
|
||||
'url': 'url',
|
||||
'type': 'type',
|
||||
'information': 'information',
|
||||
'http_error_code': 'http_error_code'
|
||||
}
|
||||
|
||||
self._url = url
|
||||
self._type = type
|
||||
self._information = information
|
||||
self._http_error_code = http_error_code
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, dikt) -> 'LinkPreviewBase':
|
||||
"""Returns the dict as a model
|
||||
|
||||
:param dikt: A dict.
|
||||
:type: dict
|
||||
:return: The LinkPreviewBase of this LinkPreviewBase. # noqa: E501
|
||||
:rtype: LinkPreviewBase
|
||||
"""
|
||||
return util.deserialize_model(dikt, cls)
|
||||
|
||||
@property
|
||||
def url(self) -> str:
|
||||
"""Gets the url of this LinkPreviewBase.
|
||||
|
||||
|
||||
:return: The url of this LinkPreviewBase.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._url
|
||||
|
||||
@url.setter
|
||||
def url(self, url: str):
|
||||
"""Sets the url of this LinkPreviewBase.
|
||||
|
||||
|
||||
:param url: The url of this LinkPreviewBase.
|
||||
:type url: str
|
||||
"""
|
||||
if url is None:
|
||||
raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501
|
||||
|
||||
self._url = url
|
||||
|
||||
@property
|
||||
def type(self) -> str:
|
||||
"""Gets the type of this LinkPreviewBase.
|
||||
|
||||
|
||||
:return: The type of this LinkPreviewBase.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._type
|
||||
|
||||
@type.setter
|
||||
def type(self, type: str):
|
||||
"""Sets the type of this LinkPreviewBase.
|
||||
|
||||
|
||||
:param type: The type of this LinkPreviewBase.
|
||||
:type type: str
|
||||
"""
|
||||
if type is None:
|
||||
raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501
|
||||
|
||||
self._type = type
|
||||
|
||||
@property
|
||||
def information(self) -> object:
|
||||
"""Gets the information of this LinkPreviewBase.
|
||||
|
||||
|
||||
:return: The information of this LinkPreviewBase.
|
||||
:rtype: object
|
||||
"""
|
||||
return self._information
|
||||
|
||||
@information.setter
|
||||
def information(self, information: object):
|
||||
"""Sets the information of this LinkPreviewBase.
|
||||
|
||||
|
||||
:param information: The information of this LinkPreviewBase.
|
||||
:type information: object
|
||||
"""
|
||||
if information is None:
|
||||
raise ValueError("Invalid value for `information`, must not be `None`") # noqa: E501
|
||||
|
||||
self._information = information
|
||||
|
||||
@property
|
||||
def http_error_code(self) -> int:
|
||||
"""Gets the http_error_code of this LinkPreviewBase.
|
||||
|
||||
|
||||
:return: The http_error_code of this LinkPreviewBase.
|
||||
:rtype: int
|
||||
"""
|
||||
return self._http_error_code
|
||||
|
||||
@http_error_code.setter
|
||||
def http_error_code(self, http_error_code: int):
|
||||
"""Sets the http_error_code of this LinkPreviewBase.
|
||||
|
||||
|
||||
:param http_error_code: The http_error_code of this LinkPreviewBase.
|
||||
:type http_error_code: int
|
||||
"""
|
||||
if http_error_code is None:
|
||||
raise ValueError("Invalid value for `http_error_code`, must not be `None`") # noqa: E501
|
||||
|
||||
self._http_error_code = http_error_code
|
|
@ -0,0 +1,149 @@
|
|||
from datetime import date, datetime # noqa: F401
|
||||
|
||||
from typing import List, Dict # noqa: F401
|
||||
|
||||
from chromestatus_openapi.models.base_model import Model
|
||||
from chromestatus_openapi.models.link_preview_github_issue_all_of_information import LinkPreviewGithubIssueAllOfInformation
|
||||
from chromestatus_openapi import util
|
||||
|
||||
from chromestatus_openapi.models.link_preview_github_issue_all_of_information import LinkPreviewGithubIssueAllOfInformation # noqa: E501
|
||||
|
||||
class LinkPreviewGithubIssue(Model):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self, url=None, type=None, information=None, http_error_code=None): # noqa: E501
|
||||
"""LinkPreviewGithubIssue - a model defined in OpenAPI
|
||||
|
||||
:param url: The url of this LinkPreviewGithubIssue. # noqa: E501
|
||||
:type url: str
|
||||
:param type: The type of this LinkPreviewGithubIssue. # noqa: E501
|
||||
:type type: str
|
||||
:param information: The information of this LinkPreviewGithubIssue. # noqa: E501
|
||||
:type information: LinkPreviewGithubIssueAllOfInformation
|
||||
:param http_error_code: The http_error_code of this LinkPreviewGithubIssue. # noqa: E501
|
||||
:type http_error_code: int
|
||||
"""
|
||||
self.openapi_types = {
|
||||
'url': str,
|
||||
'type': str,
|
||||
'information': LinkPreviewGithubIssueAllOfInformation,
|
||||
'http_error_code': int
|
||||
}
|
||||
|
||||
self.attribute_map = {
|
||||
'url': 'url',
|
||||
'type': 'type',
|
||||
'information': 'information',
|
||||
'http_error_code': 'http_error_code'
|
||||
}
|
||||
|
||||
self._url = url
|
||||
self._type = type
|
||||
self._information = information
|
||||
self._http_error_code = http_error_code
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, dikt) -> 'LinkPreviewGithubIssue':
|
||||
"""Returns the dict as a model
|
||||
|
||||
:param dikt: A dict.
|
||||
:type: dict
|
||||
:return: The LinkPreviewGithubIssue of this LinkPreviewGithubIssue. # noqa: E501
|
||||
:rtype: LinkPreviewGithubIssue
|
||||
"""
|
||||
return util.deserialize_model(dikt, cls)
|
||||
|
||||
@property
|
||||
def url(self) -> str:
|
||||
"""Gets the url of this LinkPreviewGithubIssue.
|
||||
|
||||
|
||||
:return: The url of this LinkPreviewGithubIssue.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._url
|
||||
|
||||
@url.setter
|
||||
def url(self, url: str):
|
||||
"""Sets the url of this LinkPreviewGithubIssue.
|
||||
|
||||
|
||||
:param url: The url of this LinkPreviewGithubIssue.
|
||||
:type url: str
|
||||
"""
|
||||
if url is None:
|
||||
raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501
|
||||
|
||||
self._url = url
|
||||
|
||||
@property
|
||||
def type(self) -> str:
|
||||
"""Gets the type of this LinkPreviewGithubIssue.
|
||||
|
||||
|
||||
:return: The type of this LinkPreviewGithubIssue.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._type
|
||||
|
||||
@type.setter
|
||||
def type(self, type: str):
|
||||
"""Sets the type of this LinkPreviewGithubIssue.
|
||||
|
||||
|
||||
:param type: The type of this LinkPreviewGithubIssue.
|
||||
:type type: str
|
||||
"""
|
||||
if type is None:
|
||||
raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501
|
||||
|
||||
self._type = type
|
||||
|
||||
@property
|
||||
def information(self) -> LinkPreviewGithubIssueAllOfInformation:
|
||||
"""Gets the information of this LinkPreviewGithubIssue.
|
||||
|
||||
|
||||
:return: The information of this LinkPreviewGithubIssue.
|
||||
:rtype: LinkPreviewGithubIssueAllOfInformation
|
||||
"""
|
||||
return self._information
|
||||
|
||||
@information.setter
|
||||
def information(self, information: LinkPreviewGithubIssueAllOfInformation):
|
||||
"""Sets the information of this LinkPreviewGithubIssue.
|
||||
|
||||
|
||||
:param information: The information of this LinkPreviewGithubIssue.
|
||||
:type information: LinkPreviewGithubIssueAllOfInformation
|
||||
"""
|
||||
if information is None:
|
||||
raise ValueError("Invalid value for `information`, must not be `None`") # noqa: E501
|
||||
|
||||
self._information = information
|
||||
|
||||
@property
|
||||
def http_error_code(self) -> int:
|
||||
"""Gets the http_error_code of this LinkPreviewGithubIssue.
|
||||
|
||||
|
||||
:return: The http_error_code of this LinkPreviewGithubIssue.
|
||||
:rtype: int
|
||||
"""
|
||||
return self._http_error_code
|
||||
|
||||
@http_error_code.setter
|
||||
def http_error_code(self, http_error_code: int):
|
||||
"""Sets the http_error_code of this LinkPreviewGithubIssue.
|
||||
|
||||
|
||||
:param http_error_code: The http_error_code of this LinkPreviewGithubIssue.
|
||||
:type http_error_code: int
|
||||
"""
|
||||
if http_error_code is None:
|
||||
raise ValueError("Invalid value for `http_error_code`, must not be `None`") # noqa: E501
|
||||
|
||||
self._http_error_code = http_error_code
|
|
@ -0,0 +1,333 @@
|
|||
from datetime import date, datetime # noqa: F401
|
||||
|
||||
from typing import List, Dict # noqa: F401
|
||||
|
||||
from chromestatus_openapi.models.base_model import Model
|
||||
from chromestatus_openapi import util
|
||||
|
||||
|
||||
class LinkPreviewGithubIssueAllOfInformation(Model):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self, url=None, number=None, title=None, user_login=None, state=None, state_reason=None, assignee_login=None, created_at=None, updated_at=None, closed_at=None, labels=None): # noqa: E501
|
||||
"""LinkPreviewGithubIssueAllOfInformation - a model defined in OpenAPI
|
||||
|
||||
:param url: The url of this LinkPreviewGithubIssueAllOfInformation. # noqa: E501
|
||||
:type url: str
|
||||
:param number: The number of this LinkPreviewGithubIssueAllOfInformation. # noqa: E501
|
||||
:type number: int
|
||||
:param title: The title of this LinkPreviewGithubIssueAllOfInformation. # noqa: E501
|
||||
:type title: str
|
||||
:param user_login: The user_login of this LinkPreviewGithubIssueAllOfInformation. # noqa: E501
|
||||
:type user_login: str
|
||||
:param state: The state of this LinkPreviewGithubIssueAllOfInformation. # noqa: E501
|
||||
:type state: str
|
||||
:param state_reason: The state_reason of this LinkPreviewGithubIssueAllOfInformation. # noqa: E501
|
||||
:type state_reason: str
|
||||
:param assignee_login: The assignee_login of this LinkPreviewGithubIssueAllOfInformation. # noqa: E501
|
||||
:type assignee_login: str
|
||||
:param created_at: The created_at of this LinkPreviewGithubIssueAllOfInformation. # noqa: E501
|
||||
:type created_at: date
|
||||
:param updated_at: The updated_at of this LinkPreviewGithubIssueAllOfInformation. # noqa: E501
|
||||
:type updated_at: date
|
||||
:param closed_at: The closed_at of this LinkPreviewGithubIssueAllOfInformation. # noqa: E501
|
||||
:type closed_at: date
|
||||
:param labels: The labels of this LinkPreviewGithubIssueAllOfInformation. # noqa: E501
|
||||
:type labels: List[str]
|
||||
"""
|
||||
self.openapi_types = {
|
||||
'url': str,
|
||||
'number': int,
|
||||
'title': str,
|
||||
'user_login': str,
|
||||
'state': str,
|
||||
'state_reason': str,
|
||||
'assignee_login': str,
|
||||
'created_at': date,
|
||||
'updated_at': date,
|
||||
'closed_at': date,
|
||||
'labels': List[str]
|
||||
}
|
||||
|
||||
self.attribute_map = {
|
||||
'url': 'url',
|
||||
'number': 'number',
|
||||
'title': 'title',
|
||||
'user_login': 'user_login',
|
||||
'state': 'state',
|
||||
'state_reason': 'state_reason',
|
||||
'assignee_login': 'assignee_login',
|
||||
'created_at': 'created_at',
|
||||
'updated_at': 'updated_at',
|
||||
'closed_at': 'closed_at',
|
||||
'labels': 'labels'
|
||||
}
|
||||
|
||||
self._url = url
|
||||
self._number = number
|
||||
self._title = title
|
||||
self._user_login = user_login
|
||||
self._state = state
|
||||
self._state_reason = state_reason
|
||||
self._assignee_login = assignee_login
|
||||
self._created_at = created_at
|
||||
self._updated_at = updated_at
|
||||
self._closed_at = closed_at
|
||||
self._labels = labels
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, dikt) -> 'LinkPreviewGithubIssueAllOfInformation':
|
||||
"""Returns the dict as a model
|
||||
|
||||
:param dikt: A dict.
|
||||
:type: dict
|
||||
:return: The LinkPreviewGithubIssue_allOf_information of this LinkPreviewGithubIssueAllOfInformation. # noqa: E501
|
||||
:rtype: LinkPreviewGithubIssueAllOfInformation
|
||||
"""
|
||||
return util.deserialize_model(dikt, cls)
|
||||
|
||||
@property
|
||||
def url(self) -> str:
|
||||
"""Gets the url of this LinkPreviewGithubIssueAllOfInformation.
|
||||
|
||||
|
||||
:return: The url of this LinkPreviewGithubIssueAllOfInformation.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._url
|
||||
|
||||
@url.setter
|
||||
def url(self, url: str):
|
||||
"""Sets the url of this LinkPreviewGithubIssueAllOfInformation.
|
||||
|
||||
|
||||
:param url: The url of this LinkPreviewGithubIssueAllOfInformation.
|
||||
:type url: str
|
||||
"""
|
||||
|
||||
self._url = url
|
||||
|
||||
@property
|
||||
def number(self) -> int:
|
||||
"""Gets the number of this LinkPreviewGithubIssueAllOfInformation.
|
||||
|
||||
|
||||
:return: The number of this LinkPreviewGithubIssueAllOfInformation.
|
||||
:rtype: int
|
||||
"""
|
||||
return self._number
|
||||
|
||||
@number.setter
|
||||
def number(self, number: int):
|
||||
"""Sets the number of this LinkPreviewGithubIssueAllOfInformation.
|
||||
|
||||
|
||||
:param number: The number of this LinkPreviewGithubIssueAllOfInformation.
|
||||
:type number: int
|
||||
"""
|
||||
|
||||
self._number = number
|
||||
|
||||
@property
|
||||
def title(self) -> str:
|
||||
"""Gets the title of this LinkPreviewGithubIssueAllOfInformation.
|
||||
|
||||
|
||||
:return: The title of this LinkPreviewGithubIssueAllOfInformation.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._title
|
||||
|
||||
@title.setter
|
||||
def title(self, title: str):
|
||||
"""Sets the title of this LinkPreviewGithubIssueAllOfInformation.
|
||||
|
||||
|
||||
:param title: The title of this LinkPreviewGithubIssueAllOfInformation.
|
||||
:type title: str
|
||||
"""
|
||||
|
||||
self._title = title
|
||||
|
||||
@property
|
||||
def user_login(self) -> str:
|
||||
"""Gets the user_login of this LinkPreviewGithubIssueAllOfInformation.
|
||||
|
||||
|
||||
:return: The user_login of this LinkPreviewGithubIssueAllOfInformation.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._user_login
|
||||
|
||||
@user_login.setter
|
||||
def user_login(self, user_login: str):
|
||||
"""Sets the user_login of this LinkPreviewGithubIssueAllOfInformation.
|
||||
|
||||
|
||||
:param user_login: The user_login of this LinkPreviewGithubIssueAllOfInformation.
|
||||
:type user_login: str
|
||||
"""
|
||||
|
||||
self._user_login = user_login
|
||||
|
||||
@property
|
||||
def state(self) -> str:
|
||||
"""Gets the state of this LinkPreviewGithubIssueAllOfInformation.
|
||||
|
||||
|
||||
:return: The state of this LinkPreviewGithubIssueAllOfInformation.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._state
|
||||
|
||||
@state.setter
|
||||
def state(self, state: str):
|
||||
"""Sets the state of this LinkPreviewGithubIssueAllOfInformation.
|
||||
|
||||
|
||||
:param state: The state of this LinkPreviewGithubIssueAllOfInformation.
|
||||
:type state: str
|
||||
"""
|
||||
allowed_values = ["open", "closed"] # noqa: E501
|
||||
if state not in allowed_values:
|
||||
raise ValueError(
|
||||
"Invalid value for `state` ({0}), must be one of {1}"
|
||||
.format(state, allowed_values)
|
||||
)
|
||||
|
||||
self._state = state
|
||||
|
||||
@property
|
||||
def state_reason(self) -> str:
|
||||
"""Gets the state_reason of this LinkPreviewGithubIssueAllOfInformation.
|
||||
|
||||
|
||||
:return: The state_reason of this LinkPreviewGithubIssueAllOfInformation.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._state_reason
|
||||
|
||||
@state_reason.setter
|
||||
def state_reason(self, state_reason: str):
|
||||
"""Sets the state_reason of this LinkPreviewGithubIssueAllOfInformation.
|
||||
|
||||
|
||||
:param state_reason: The state_reason of this LinkPreviewGithubIssueAllOfInformation.
|
||||
:type state_reason: str
|
||||
"""
|
||||
allowed_values = ["completed", "reopened", "not_planned"] # noqa: E501
|
||||
if state_reason not in allowed_values:
|
||||
raise ValueError(
|
||||
"Invalid value for `state_reason` ({0}), must be one of {1}"
|
||||
.format(state_reason, allowed_values)
|
||||
)
|
||||
|
||||
self._state_reason = state_reason
|
||||
|
||||
@property
|
||||
def assignee_login(self) -> str:
|
||||
"""Gets the assignee_login of this LinkPreviewGithubIssueAllOfInformation.
|
||||
|
||||
|
||||
:return: The assignee_login of this LinkPreviewGithubIssueAllOfInformation.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._assignee_login
|
||||
|
||||
@assignee_login.setter
|
||||
def assignee_login(self, assignee_login: str):
|
||||
"""Sets the assignee_login of this LinkPreviewGithubIssueAllOfInformation.
|
||||
|
||||
|
||||
:param assignee_login: The assignee_login of this LinkPreviewGithubIssueAllOfInformation.
|
||||
:type assignee_login: str
|
||||
"""
|
||||
|
||||
self._assignee_login = assignee_login
|
||||
|
||||
@property
|
||||
def created_at(self) -> date:
|
||||
"""Gets the created_at of this LinkPreviewGithubIssueAllOfInformation.
|
||||
|
||||
|
||||
:return: The created_at of this LinkPreviewGithubIssueAllOfInformation.
|
||||
:rtype: date
|
||||
"""
|
||||
return self._created_at
|
||||
|
||||
@created_at.setter
|
||||
def created_at(self, created_at: date):
|
||||
"""Sets the created_at of this LinkPreviewGithubIssueAllOfInformation.
|
||||
|
||||
|
||||
:param created_at: The created_at of this LinkPreviewGithubIssueAllOfInformation.
|
||||
:type created_at: date
|
||||
"""
|
||||
|
||||
self._created_at = created_at
|
||||
|
||||
@property
|
||||
def updated_at(self) -> date:
|
||||
"""Gets the updated_at of this LinkPreviewGithubIssueAllOfInformation.
|
||||
|
||||
|
||||
:return: The updated_at of this LinkPreviewGithubIssueAllOfInformation.
|
||||
:rtype: date
|
||||
"""
|
||||
return self._updated_at
|
||||
|
||||
@updated_at.setter
|
||||
def updated_at(self, updated_at: date):
|
||||
"""Sets the updated_at of this LinkPreviewGithubIssueAllOfInformation.
|
||||
|
||||
|
||||
:param updated_at: The updated_at of this LinkPreviewGithubIssueAllOfInformation.
|
||||
:type updated_at: date
|
||||
"""
|
||||
|
||||
self._updated_at = updated_at
|
||||
|
||||
@property
|
||||
def closed_at(self) -> date:
|
||||
"""Gets the closed_at of this LinkPreviewGithubIssueAllOfInformation.
|
||||
|
||||
|
||||
:return: The closed_at of this LinkPreviewGithubIssueAllOfInformation.
|
||||
:rtype: date
|
||||
"""
|
||||
return self._closed_at
|
||||
|
||||
@closed_at.setter
|
||||
def closed_at(self, closed_at: date):
|
||||
"""Sets the closed_at of this LinkPreviewGithubIssueAllOfInformation.
|
||||
|
||||
|
||||
:param closed_at: The closed_at of this LinkPreviewGithubIssueAllOfInformation.
|
||||
:type closed_at: date
|
||||
"""
|
||||
|
||||
self._closed_at = closed_at
|
||||
|
||||
@property
|
||||
def labels(self) -> List[str]:
|
||||
"""Gets the labels of this LinkPreviewGithubIssueAllOfInformation.
|
||||
|
||||
|
||||
:return: The labels of this LinkPreviewGithubIssueAllOfInformation.
|
||||
:rtype: List[str]
|
||||
"""
|
||||
return self._labels
|
||||
|
||||
@labels.setter
|
||||
def labels(self, labels: List[str]):
|
||||
"""Sets the labels of this LinkPreviewGithubIssueAllOfInformation.
|
||||
|
||||
|
||||
:param labels: The labels of this LinkPreviewGithubIssueAllOfInformation.
|
||||
:type labels: List[str]
|
||||
"""
|
||||
|
||||
self._labels = labels
|
|
@ -0,0 +1,149 @@
|
|||
from datetime import date, datetime # noqa: F401
|
||||
|
||||
from typing import List, Dict # noqa: F401
|
||||
|
||||
from chromestatus_openapi.models.base_model import Model
|
||||
from chromestatus_openapi.models.link_preview_github_markdown_all_of_information import LinkPreviewGithubMarkdownAllOfInformation
|
||||
from chromestatus_openapi import util
|
||||
|
||||
from chromestatus_openapi.models.link_preview_github_markdown_all_of_information import LinkPreviewGithubMarkdownAllOfInformation # noqa: E501
|
||||
|
||||
class LinkPreviewGithubMarkdown(Model):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self, url=None, type=None, information=None, http_error_code=None): # noqa: E501
|
||||
"""LinkPreviewGithubMarkdown - a model defined in OpenAPI
|
||||
|
||||
:param url: The url of this LinkPreviewGithubMarkdown. # noqa: E501
|
||||
:type url: str
|
||||
:param type: The type of this LinkPreviewGithubMarkdown. # noqa: E501
|
||||
:type type: str
|
||||
:param information: The information of this LinkPreviewGithubMarkdown. # noqa: E501
|
||||
:type information: LinkPreviewGithubMarkdownAllOfInformation
|
||||
:param http_error_code: The http_error_code of this LinkPreviewGithubMarkdown. # noqa: E501
|
||||
:type http_error_code: int
|
||||
"""
|
||||
self.openapi_types = {
|
||||
'url': str,
|
||||
'type': str,
|
||||
'information': LinkPreviewGithubMarkdownAllOfInformation,
|
||||
'http_error_code': int
|
||||
}
|
||||
|
||||
self.attribute_map = {
|
||||
'url': 'url',
|
||||
'type': 'type',
|
||||
'information': 'information',
|
||||
'http_error_code': 'http_error_code'
|
||||
}
|
||||
|
||||
self._url = url
|
||||
self._type = type
|
||||
self._information = information
|
||||
self._http_error_code = http_error_code
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, dikt) -> 'LinkPreviewGithubMarkdown':
|
||||
"""Returns the dict as a model
|
||||
|
||||
:param dikt: A dict.
|
||||
:type: dict
|
||||
:return: The LinkPreviewGithubMarkdown of this LinkPreviewGithubMarkdown. # noqa: E501
|
||||
:rtype: LinkPreviewGithubMarkdown
|
||||
"""
|
||||
return util.deserialize_model(dikt, cls)
|
||||
|
||||
@property
|
||||
def url(self) -> str:
|
||||
"""Gets the url of this LinkPreviewGithubMarkdown.
|
||||
|
||||
|
||||
:return: The url of this LinkPreviewGithubMarkdown.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._url
|
||||
|
||||
@url.setter
|
||||
def url(self, url: str):
|
||||
"""Sets the url of this LinkPreviewGithubMarkdown.
|
||||
|
||||
|
||||
:param url: The url of this LinkPreviewGithubMarkdown.
|
||||
:type url: str
|
||||
"""
|
||||
if url is None:
|
||||
raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501
|
||||
|
||||
self._url = url
|
||||
|
||||
@property
|
||||
def type(self) -> str:
|
||||
"""Gets the type of this LinkPreviewGithubMarkdown.
|
||||
|
||||
|
||||
:return: The type of this LinkPreviewGithubMarkdown.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._type
|
||||
|
||||
@type.setter
|
||||
def type(self, type: str):
|
||||
"""Sets the type of this LinkPreviewGithubMarkdown.
|
||||
|
||||
|
||||
:param type: The type of this LinkPreviewGithubMarkdown.
|
||||
:type type: str
|
||||
"""
|
||||
if type is None:
|
||||
raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501
|
||||
|
||||
self._type = type
|
||||
|
||||
@property
|
||||
def information(self) -> LinkPreviewGithubMarkdownAllOfInformation:
|
||||
"""Gets the information of this LinkPreviewGithubMarkdown.
|
||||
|
||||
|
||||
:return: The information of this LinkPreviewGithubMarkdown.
|
||||
:rtype: LinkPreviewGithubMarkdownAllOfInformation
|
||||
"""
|
||||
return self._information
|
||||
|
||||
@information.setter
|
||||
def information(self, information: LinkPreviewGithubMarkdownAllOfInformation):
|
||||
"""Sets the information of this LinkPreviewGithubMarkdown.
|
||||
|
||||
|
||||
:param information: The information of this LinkPreviewGithubMarkdown.
|
||||
:type information: LinkPreviewGithubMarkdownAllOfInformation
|
||||
"""
|
||||
if information is None:
|
||||
raise ValueError("Invalid value for `information`, must not be `None`") # noqa: E501
|
||||
|
||||
self._information = information
|
||||
|
||||
@property
|
||||
def http_error_code(self) -> int:
|
||||
"""Gets the http_error_code of this LinkPreviewGithubMarkdown.
|
||||
|
||||
|
||||
:return: The http_error_code of this LinkPreviewGithubMarkdown.
|
||||
:rtype: int
|
||||
"""
|
||||
return self._http_error_code
|
||||
|
||||
@http_error_code.setter
|
||||
def http_error_code(self, http_error_code: int):
|
||||
"""Sets the http_error_code of this LinkPreviewGithubMarkdown.
|
||||
|
||||
|
||||
:param http_error_code: The http_error_code of this LinkPreviewGithubMarkdown.
|
||||
:type http_error_code: int
|
||||
"""
|
||||
if http_error_code is None:
|
||||
raise ValueError("Invalid value for `http_error_code`, must not be `None`") # noqa: E501
|
||||
|
||||
self._http_error_code = http_error_code
|
|
@ -0,0 +1,87 @@
|
|||
from datetime import date, datetime # noqa: F401
|
||||
|
||||
from typing import List, Dict # noqa: F401
|
||||
|
||||
from chromestatus_openapi.models.base_model import Model
|
||||
from chromestatus_openapi import util
|
||||
|
||||
|
||||
class LinkPreviewGithubMarkdownAllOfInformation(Model):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self, parsed_title=None, content=None): # noqa: E501
|
||||
"""LinkPreviewGithubMarkdownAllOfInformation - a model defined in OpenAPI
|
||||
|
||||
:param parsed_title: The parsed_title of this LinkPreviewGithubMarkdownAllOfInformation. # noqa: E501
|
||||
:type parsed_title: str
|
||||
:param content: The content of this LinkPreviewGithubMarkdownAllOfInformation. # noqa: E501
|
||||
:type content: str
|
||||
"""
|
||||
self.openapi_types = {
|
||||
'parsed_title': str,
|
||||
'content': str
|
||||
}
|
||||
|
||||
self.attribute_map = {
|
||||
'parsed_title': '_parsed_title',
|
||||
'content': 'content'
|
||||
}
|
||||
|
||||
self._parsed_title = parsed_title
|
||||
self._content = content
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, dikt) -> 'LinkPreviewGithubMarkdownAllOfInformation':
|
||||
"""Returns the dict as a model
|
||||
|
||||
:param dikt: A dict.
|
||||
:type: dict
|
||||
:return: The LinkPreviewGithubMarkdown_allOf_information of this LinkPreviewGithubMarkdownAllOfInformation. # noqa: E501
|
||||
:rtype: LinkPreviewGithubMarkdownAllOfInformation
|
||||
"""
|
||||
return util.deserialize_model(dikt, cls)
|
||||
|
||||
@property
|
||||
def parsed_title(self) -> str:
|
||||
"""Gets the parsed_title of this LinkPreviewGithubMarkdownAllOfInformation.
|
||||
|
||||
|
||||
:return: The parsed_title of this LinkPreviewGithubMarkdownAllOfInformation.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._parsed_title
|
||||
|
||||
@parsed_title.setter
|
||||
def parsed_title(self, parsed_title: str):
|
||||
"""Sets the parsed_title of this LinkPreviewGithubMarkdownAllOfInformation.
|
||||
|
||||
|
||||
:param parsed_title: The parsed_title of this LinkPreviewGithubMarkdownAllOfInformation.
|
||||
:type parsed_title: str
|
||||
"""
|
||||
|
||||
self._parsed_title = parsed_title
|
||||
|
||||
@property
|
||||
def content(self) -> str:
|
||||
"""Gets the content of this LinkPreviewGithubMarkdownAllOfInformation.
|
||||
|
||||
|
||||
:return: The content of this LinkPreviewGithubMarkdownAllOfInformation.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._content
|
||||
|
||||
@content.setter
|
||||
def content(self, content: str):
|
||||
"""Sets the content of this LinkPreviewGithubMarkdownAllOfInformation.
|
||||
|
||||
|
||||
:param content: The content of this LinkPreviewGithubMarkdownAllOfInformation.
|
||||
:type content: str
|
||||
"""
|
||||
|
||||
self._content = content
|
|
@ -0,0 +1,149 @@
|
|||
from datetime import date, datetime # noqa: F401
|
||||
|
||||
from typing import List, Dict # noqa: F401
|
||||
|
||||
from chromestatus_openapi.models.base_model import Model
|
||||
from chromestatus_openapi.models.link_preview_github_issue_all_of_information import LinkPreviewGithubIssueAllOfInformation
|
||||
from chromestatus_openapi import util
|
||||
|
||||
from chromestatus_openapi.models.link_preview_github_issue_all_of_information import LinkPreviewGithubIssueAllOfInformation # noqa: E501
|
||||
|
||||
class LinkPreviewGithubPullRequest(Model):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self, url=None, type=None, information=None, http_error_code=None): # noqa: E501
|
||||
"""LinkPreviewGithubPullRequest - a model defined in OpenAPI
|
||||
|
||||
:param url: The url of this LinkPreviewGithubPullRequest. # noqa: E501
|
||||
:type url: str
|
||||
:param type: The type of this LinkPreviewGithubPullRequest. # noqa: E501
|
||||
:type type: str
|
||||
:param information: The information of this LinkPreviewGithubPullRequest. # noqa: E501
|
||||
:type information: LinkPreviewGithubIssueAllOfInformation
|
||||
:param http_error_code: The http_error_code of this LinkPreviewGithubPullRequest. # noqa: E501
|
||||
:type http_error_code: int
|
||||
"""
|
||||
self.openapi_types = {
|
||||
'url': str,
|
||||
'type': str,
|
||||
'information': LinkPreviewGithubIssueAllOfInformation,
|
||||
'http_error_code': int
|
||||
}
|
||||
|
||||
self.attribute_map = {
|
||||
'url': 'url',
|
||||
'type': 'type',
|
||||
'information': 'information',
|
||||
'http_error_code': 'http_error_code'
|
||||
}
|
||||
|
||||
self._url = url
|
||||
self._type = type
|
||||
self._information = information
|
||||
self._http_error_code = http_error_code
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, dikt) -> 'LinkPreviewGithubPullRequest':
|
||||
"""Returns the dict as a model
|
||||
|
||||
:param dikt: A dict.
|
||||
:type: dict
|
||||
:return: The LinkPreviewGithubPullRequest of this LinkPreviewGithubPullRequest. # noqa: E501
|
||||
:rtype: LinkPreviewGithubPullRequest
|
||||
"""
|
||||
return util.deserialize_model(dikt, cls)
|
||||
|
||||
@property
|
||||
def url(self) -> str:
|
||||
"""Gets the url of this LinkPreviewGithubPullRequest.
|
||||
|
||||
|
||||
:return: The url of this LinkPreviewGithubPullRequest.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._url
|
||||
|
||||
@url.setter
|
||||
def url(self, url: str):
|
||||
"""Sets the url of this LinkPreviewGithubPullRequest.
|
||||
|
||||
|
||||
:param url: The url of this LinkPreviewGithubPullRequest.
|
||||
:type url: str
|
||||
"""
|
||||
if url is None:
|
||||
raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501
|
||||
|
||||
self._url = url
|
||||
|
||||
@property
|
||||
def type(self) -> str:
|
||||
"""Gets the type of this LinkPreviewGithubPullRequest.
|
||||
|
||||
|
||||
:return: The type of this LinkPreviewGithubPullRequest.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._type
|
||||
|
||||
@type.setter
|
||||
def type(self, type: str):
|
||||
"""Sets the type of this LinkPreviewGithubPullRequest.
|
||||
|
||||
|
||||
:param type: The type of this LinkPreviewGithubPullRequest.
|
||||
:type type: str
|
||||
"""
|
||||
if type is None:
|
||||
raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501
|
||||
|
||||
self._type = type
|
||||
|
||||
@property
|
||||
def information(self) -> LinkPreviewGithubIssueAllOfInformation:
|
||||
"""Gets the information of this LinkPreviewGithubPullRequest.
|
||||
|
||||
|
||||
:return: The information of this LinkPreviewGithubPullRequest.
|
||||
:rtype: LinkPreviewGithubIssueAllOfInformation
|
||||
"""
|
||||
return self._information
|
||||
|
||||
@information.setter
|
||||
def information(self, information: LinkPreviewGithubIssueAllOfInformation):
|
||||
"""Sets the information of this LinkPreviewGithubPullRequest.
|
||||
|
||||
|
||||
:param information: The information of this LinkPreviewGithubPullRequest.
|
||||
:type information: LinkPreviewGithubIssueAllOfInformation
|
||||
"""
|
||||
if information is None:
|
||||
raise ValueError("Invalid value for `information`, must not be `None`") # noqa: E501
|
||||
|
||||
self._information = information
|
||||
|
||||
@property
|
||||
def http_error_code(self) -> int:
|
||||
"""Gets the http_error_code of this LinkPreviewGithubPullRequest.
|
||||
|
||||
|
||||
:return: The http_error_code of this LinkPreviewGithubPullRequest.
|
||||
:rtype: int
|
||||
"""
|
||||
return self._http_error_code
|
||||
|
||||
@http_error_code.setter
|
||||
def http_error_code(self, http_error_code: int):
|
||||
"""Sets the http_error_code of this LinkPreviewGithubPullRequest.
|
||||
|
||||
|
||||
:param http_error_code: The http_error_code of this LinkPreviewGithubPullRequest.
|
||||
:type http_error_code: int
|
||||
"""
|
||||
if http_error_code is None:
|
||||
raise ValueError("Invalid value for `http_error_code`, must not be `None`") # noqa: E501
|
||||
|
||||
self._http_error_code = http_error_code
|
|
@ -0,0 +1,149 @@
|
|||
from datetime import date, datetime # noqa: F401
|
||||
|
||||
from typing import List, Dict # noqa: F401
|
||||
|
||||
from chromestatus_openapi.models.base_model import Model
|
||||
from chromestatus_openapi.models.link_preview_open_graph_all_of_information import LinkPreviewOpenGraphAllOfInformation
|
||||
from chromestatus_openapi import util
|
||||
|
||||
from chromestatus_openapi.models.link_preview_open_graph_all_of_information import LinkPreviewOpenGraphAllOfInformation # noqa: E501
|
||||
|
||||
class LinkPreviewGoogleDocs(Model):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self, url=None, type=None, information=None, http_error_code=None): # noqa: E501
|
||||
"""LinkPreviewGoogleDocs - a model defined in OpenAPI
|
||||
|
||||
:param url: The url of this LinkPreviewGoogleDocs. # noqa: E501
|
||||
:type url: str
|
||||
:param type: The type of this LinkPreviewGoogleDocs. # noqa: E501
|
||||
:type type: str
|
||||
:param information: The information of this LinkPreviewGoogleDocs. # noqa: E501
|
||||
:type information: LinkPreviewOpenGraphAllOfInformation
|
||||
:param http_error_code: The http_error_code of this LinkPreviewGoogleDocs. # noqa: E501
|
||||
:type http_error_code: int
|
||||
"""
|
||||
self.openapi_types = {
|
||||
'url': str,
|
||||
'type': str,
|
||||
'information': LinkPreviewOpenGraphAllOfInformation,
|
||||
'http_error_code': int
|
||||
}
|
||||
|
||||
self.attribute_map = {
|
||||
'url': 'url',
|
||||
'type': 'type',
|
||||
'information': 'information',
|
||||
'http_error_code': 'http_error_code'
|
||||
}
|
||||
|
||||
self._url = url
|
||||
self._type = type
|
||||
self._information = information
|
||||
self._http_error_code = http_error_code
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, dikt) -> 'LinkPreviewGoogleDocs':
|
||||
"""Returns the dict as a model
|
||||
|
||||
:param dikt: A dict.
|
||||
:type: dict
|
||||
:return: The LinkPreviewGoogleDocs of this LinkPreviewGoogleDocs. # noqa: E501
|
||||
:rtype: LinkPreviewGoogleDocs
|
||||
"""
|
||||
return util.deserialize_model(dikt, cls)
|
||||
|
||||
@property
|
||||
def url(self) -> str:
|
||||
"""Gets the url of this LinkPreviewGoogleDocs.
|
||||
|
||||
|
||||
:return: The url of this LinkPreviewGoogleDocs.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._url
|
||||
|
||||
@url.setter
|
||||
def url(self, url: str):
|
||||
"""Sets the url of this LinkPreviewGoogleDocs.
|
||||
|
||||
|
||||
:param url: The url of this LinkPreviewGoogleDocs.
|
||||
:type url: str
|
||||
"""
|
||||
if url is None:
|
||||
raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501
|
||||
|
||||
self._url = url
|
||||
|
||||
@property
|
||||
def type(self) -> str:
|
||||
"""Gets the type of this LinkPreviewGoogleDocs.
|
||||
|
||||
|
||||
:return: The type of this LinkPreviewGoogleDocs.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._type
|
||||
|
||||
@type.setter
|
||||
def type(self, type: str):
|
||||
"""Sets the type of this LinkPreviewGoogleDocs.
|
||||
|
||||
|
||||
:param type: The type of this LinkPreviewGoogleDocs.
|
||||
:type type: str
|
||||
"""
|
||||
if type is None:
|
||||
raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501
|
||||
|
||||
self._type = type
|
||||
|
||||
@property
|
||||
def information(self) -> LinkPreviewOpenGraphAllOfInformation:
|
||||
"""Gets the information of this LinkPreviewGoogleDocs.
|
||||
|
||||
|
||||
:return: The information of this LinkPreviewGoogleDocs.
|
||||
:rtype: LinkPreviewOpenGraphAllOfInformation
|
||||
"""
|
||||
return self._information
|
||||
|
||||
@information.setter
|
||||
def information(self, information: LinkPreviewOpenGraphAllOfInformation):
|
||||
"""Sets the information of this LinkPreviewGoogleDocs.
|
||||
|
||||
|
||||
:param information: The information of this LinkPreviewGoogleDocs.
|
||||
:type information: LinkPreviewOpenGraphAllOfInformation
|
||||
"""
|
||||
if information is None:
|
||||
raise ValueError("Invalid value for `information`, must not be `None`") # noqa: E501
|
||||
|
||||
self._information = information
|
||||
|
||||
@property
|
||||
def http_error_code(self) -> int:
|
||||
"""Gets the http_error_code of this LinkPreviewGoogleDocs.
|
||||
|
||||
|
||||
:return: The http_error_code of this LinkPreviewGoogleDocs.
|
||||
:rtype: int
|
||||
"""
|
||||
return self._http_error_code
|
||||
|
||||
@http_error_code.setter
|
||||
def http_error_code(self, http_error_code: int):
|
||||
"""Sets the http_error_code of this LinkPreviewGoogleDocs.
|
||||
|
||||
|
||||
:param http_error_code: The http_error_code of this LinkPreviewGoogleDocs.
|
||||
:type http_error_code: int
|
||||
"""
|
||||
if http_error_code is None:
|
||||
raise ValueError("Invalid value for `http_error_code`, must not be `None`") # noqa: E501
|
||||
|
||||
self._http_error_code = http_error_code
|
|
@ -0,0 +1,149 @@
|
|||
from datetime import date, datetime # noqa: F401
|
||||
|
||||
from typing import List, Dict # noqa: F401
|
||||
|
||||
from chromestatus_openapi.models.base_model import Model
|
||||
from chromestatus_openapi.models.link_preview_open_graph_all_of_information import LinkPreviewOpenGraphAllOfInformation
|
||||
from chromestatus_openapi import util
|
||||
|
||||
from chromestatus_openapi.models.link_preview_open_graph_all_of_information import LinkPreviewOpenGraphAllOfInformation # noqa: E501
|
||||
|
||||
class LinkPreviewMdnDocs(Model):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self, url=None, type=None, information=None, http_error_code=None): # noqa: E501
|
||||
"""LinkPreviewMdnDocs - a model defined in OpenAPI
|
||||
|
||||
:param url: The url of this LinkPreviewMdnDocs. # noqa: E501
|
||||
:type url: str
|
||||
:param type: The type of this LinkPreviewMdnDocs. # noqa: E501
|
||||
:type type: str
|
||||
:param information: The information of this LinkPreviewMdnDocs. # noqa: E501
|
||||
:type information: LinkPreviewOpenGraphAllOfInformation
|
||||
:param http_error_code: The http_error_code of this LinkPreviewMdnDocs. # noqa: E501
|
||||
:type http_error_code: int
|
||||
"""
|
||||
self.openapi_types = {
|
||||
'url': str,
|
||||
'type': str,
|
||||
'information': LinkPreviewOpenGraphAllOfInformation,
|
||||
'http_error_code': int
|
||||
}
|
||||
|
||||
self.attribute_map = {
|
||||
'url': 'url',
|
||||
'type': 'type',
|
||||
'information': 'information',
|
||||
'http_error_code': 'http_error_code'
|
||||
}
|
||||
|
||||
self._url = url
|
||||
self._type = type
|
||||
self._information = information
|
||||
self._http_error_code = http_error_code
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, dikt) -> 'LinkPreviewMdnDocs':
|
||||
"""Returns the dict as a model
|
||||
|
||||
:param dikt: A dict.
|
||||
:type: dict
|
||||
:return: The LinkPreviewMdnDocs of this LinkPreviewMdnDocs. # noqa: E501
|
||||
:rtype: LinkPreviewMdnDocs
|
||||
"""
|
||||
return util.deserialize_model(dikt, cls)
|
||||
|
||||
@property
|
||||
def url(self) -> str:
|
||||
"""Gets the url of this LinkPreviewMdnDocs.
|
||||
|
||||
|
||||
:return: The url of this LinkPreviewMdnDocs.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._url
|
||||
|
||||
@url.setter
|
||||
def url(self, url: str):
|
||||
"""Sets the url of this LinkPreviewMdnDocs.
|
||||
|
||||
|
||||
:param url: The url of this LinkPreviewMdnDocs.
|
||||
:type url: str
|
||||
"""
|
||||
if url is None:
|
||||
raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501
|
||||
|
||||
self._url = url
|
||||
|
||||
@property
|
||||
def type(self) -> str:
|
||||
"""Gets the type of this LinkPreviewMdnDocs.
|
||||
|
||||
|
||||
:return: The type of this LinkPreviewMdnDocs.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._type
|
||||
|
||||
@type.setter
|
||||
def type(self, type: str):
|
||||
"""Sets the type of this LinkPreviewMdnDocs.
|
||||
|
||||
|
||||
:param type: The type of this LinkPreviewMdnDocs.
|
||||
:type type: str
|
||||
"""
|
||||
if type is None:
|
||||
raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501
|
||||
|
||||
self._type = type
|
||||
|
||||
@property
|
||||
def information(self) -> LinkPreviewOpenGraphAllOfInformation:
|
||||
"""Gets the information of this LinkPreviewMdnDocs.
|
||||
|
||||
|
||||
:return: The information of this LinkPreviewMdnDocs.
|
||||
:rtype: LinkPreviewOpenGraphAllOfInformation
|
||||
"""
|
||||
return self._information
|
||||
|
||||
@information.setter
|
||||
def information(self, information: LinkPreviewOpenGraphAllOfInformation):
|
||||
"""Sets the information of this LinkPreviewMdnDocs.
|
||||
|
||||
|
||||
:param information: The information of this LinkPreviewMdnDocs.
|
||||
:type information: LinkPreviewOpenGraphAllOfInformation
|
||||
"""
|
||||
if information is None:
|
||||
raise ValueError("Invalid value for `information`, must not be `None`") # noqa: E501
|
||||
|
||||
self._information = information
|
||||
|
||||
@property
|
||||
def http_error_code(self) -> int:
|
||||
"""Gets the http_error_code of this LinkPreviewMdnDocs.
|
||||
|
||||
|
||||
:return: The http_error_code of this LinkPreviewMdnDocs.
|
||||
:rtype: int
|
||||
"""
|
||||
return self._http_error_code
|
||||
|
||||
@http_error_code.setter
|
||||
def http_error_code(self, http_error_code: int):
|
||||
"""Sets the http_error_code of this LinkPreviewMdnDocs.
|
||||
|
||||
|
||||
:param http_error_code: The http_error_code of this LinkPreviewMdnDocs.
|
||||
:type http_error_code: int
|
||||
"""
|
||||
if http_error_code is None:
|
||||
raise ValueError("Invalid value for `http_error_code`, must not be `None`") # noqa: E501
|
||||
|
||||
self._http_error_code = http_error_code
|
|
@ -0,0 +1,149 @@
|
|||
from datetime import date, datetime # noqa: F401
|
||||
|
||||
from typing import List, Dict # noqa: F401
|
||||
|
||||
from chromestatus_openapi.models.base_model import Model
|
||||
from chromestatus_openapi.models.link_preview_open_graph_all_of_information import LinkPreviewOpenGraphAllOfInformation
|
||||
from chromestatus_openapi import util
|
||||
|
||||
from chromestatus_openapi.models.link_preview_open_graph_all_of_information import LinkPreviewOpenGraphAllOfInformation # noqa: E501
|
||||
|
||||
class LinkPreviewMozillaBug(Model):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self, url=None, type=None, information=None, http_error_code=None): # noqa: E501
|
||||
"""LinkPreviewMozillaBug - a model defined in OpenAPI
|
||||
|
||||
:param url: The url of this LinkPreviewMozillaBug. # noqa: E501
|
||||
:type url: str
|
||||
:param type: The type of this LinkPreviewMozillaBug. # noqa: E501
|
||||
:type type: str
|
||||
:param information: The information of this LinkPreviewMozillaBug. # noqa: E501
|
||||
:type information: LinkPreviewOpenGraphAllOfInformation
|
||||
:param http_error_code: The http_error_code of this LinkPreviewMozillaBug. # noqa: E501
|
||||
:type http_error_code: int
|
||||
"""
|
||||
self.openapi_types = {
|
||||
'url': str,
|
||||
'type': str,
|
||||
'information': LinkPreviewOpenGraphAllOfInformation,
|
||||
'http_error_code': int
|
||||
}
|
||||
|
||||
self.attribute_map = {
|
||||
'url': 'url',
|
||||
'type': 'type',
|
||||
'information': 'information',
|
||||
'http_error_code': 'http_error_code'
|
||||
}
|
||||
|
||||
self._url = url
|
||||
self._type = type
|
||||
self._information = information
|
||||
self._http_error_code = http_error_code
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, dikt) -> 'LinkPreviewMozillaBug':
|
||||
"""Returns the dict as a model
|
||||
|
||||
:param dikt: A dict.
|
||||
:type: dict
|
||||
:return: The LinkPreviewMozillaBug of this LinkPreviewMozillaBug. # noqa: E501
|
||||
:rtype: LinkPreviewMozillaBug
|
||||
"""
|
||||
return util.deserialize_model(dikt, cls)
|
||||
|
||||
@property
|
||||
def url(self) -> str:
|
||||
"""Gets the url of this LinkPreviewMozillaBug.
|
||||
|
||||
|
||||
:return: The url of this LinkPreviewMozillaBug.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._url
|
||||
|
||||
@url.setter
|
||||
def url(self, url: str):
|
||||
"""Sets the url of this LinkPreviewMozillaBug.
|
||||
|
||||
|
||||
:param url: The url of this LinkPreviewMozillaBug.
|
||||
:type url: str
|
||||
"""
|
||||
if url is None:
|
||||
raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501
|
||||
|
||||
self._url = url
|
||||
|
||||
@property
|
||||
def type(self) -> str:
|
||||
"""Gets the type of this LinkPreviewMozillaBug.
|
||||
|
||||
|
||||
:return: The type of this LinkPreviewMozillaBug.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._type
|
||||
|
||||
@type.setter
|
||||
def type(self, type: str):
|
||||
"""Sets the type of this LinkPreviewMozillaBug.
|
||||
|
||||
|
||||
:param type: The type of this LinkPreviewMozillaBug.
|
||||
:type type: str
|
||||
"""
|
||||
if type is None:
|
||||
raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501
|
||||
|
||||
self._type = type
|
||||
|
||||
@property
|
||||
def information(self) -> LinkPreviewOpenGraphAllOfInformation:
|
||||
"""Gets the information of this LinkPreviewMozillaBug.
|
||||
|
||||
|
||||
:return: The information of this LinkPreviewMozillaBug.
|
||||
:rtype: LinkPreviewOpenGraphAllOfInformation
|
||||
"""
|
||||
return self._information
|
||||
|
||||
@information.setter
|
||||
def information(self, information: LinkPreviewOpenGraphAllOfInformation):
|
||||
"""Sets the information of this LinkPreviewMozillaBug.
|
||||
|
||||
|
||||
:param information: The information of this LinkPreviewMozillaBug.
|
||||
:type information: LinkPreviewOpenGraphAllOfInformation
|
||||
"""
|
||||
if information is None:
|
||||
raise ValueError("Invalid value for `information`, must not be `None`") # noqa: E501
|
||||
|
||||
self._information = information
|
||||
|
||||
@property
|
||||
def http_error_code(self) -> int:
|
||||
"""Gets the http_error_code of this LinkPreviewMozillaBug.
|
||||
|
||||
|
||||
:return: The http_error_code of this LinkPreviewMozillaBug.
|
||||
:rtype: int
|
||||
"""
|
||||
return self._http_error_code
|
||||
|
||||
@http_error_code.setter
|
||||
def http_error_code(self, http_error_code: int):
|
||||
"""Sets the http_error_code of this LinkPreviewMozillaBug.
|
||||
|
||||
|
||||
:param http_error_code: The http_error_code of this LinkPreviewMozillaBug.
|
||||
:type http_error_code: int
|
||||
"""
|
||||
if http_error_code is None:
|
||||
raise ValueError("Invalid value for `http_error_code`, must not be `None`") # noqa: E501
|
||||
|
||||
self._http_error_code = http_error_code
|
|
@ -0,0 +1,149 @@
|
|||
from datetime import date, datetime # noqa: F401
|
||||
|
||||
from typing import List, Dict # noqa: F401
|
||||
|
||||
from chromestatus_openapi.models.base_model import Model
|
||||
from chromestatus_openapi.models.link_preview_open_graph_all_of_information import LinkPreviewOpenGraphAllOfInformation
|
||||
from chromestatus_openapi import util
|
||||
|
||||
from chromestatus_openapi.models.link_preview_open_graph_all_of_information import LinkPreviewOpenGraphAllOfInformation # noqa: E501
|
||||
|
||||
class LinkPreviewOpenGraph(Model):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self, url=None, type=None, information=None, http_error_code=None): # noqa: E501
|
||||
"""LinkPreviewOpenGraph - a model defined in OpenAPI
|
||||
|
||||
:param url: The url of this LinkPreviewOpenGraph. # noqa: E501
|
||||
:type url: str
|
||||
:param type: The type of this LinkPreviewOpenGraph. # noqa: E501
|
||||
:type type: str
|
||||
:param information: The information of this LinkPreviewOpenGraph. # noqa: E501
|
||||
:type information: LinkPreviewOpenGraphAllOfInformation
|
||||
:param http_error_code: The http_error_code of this LinkPreviewOpenGraph. # noqa: E501
|
||||
:type http_error_code: int
|
||||
"""
|
||||
self.openapi_types = {
|
||||
'url': str,
|
||||
'type': str,
|
||||
'information': LinkPreviewOpenGraphAllOfInformation,
|
||||
'http_error_code': int
|
||||
}
|
||||
|
||||
self.attribute_map = {
|
||||
'url': 'url',
|
||||
'type': 'type',
|
||||
'information': 'information',
|
||||
'http_error_code': 'http_error_code'
|
||||
}
|
||||
|
||||
self._url = url
|
||||
self._type = type
|
||||
self._information = information
|
||||
self._http_error_code = http_error_code
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, dikt) -> 'LinkPreviewOpenGraph':
|
||||
"""Returns the dict as a model
|
||||
|
||||
:param dikt: A dict.
|
||||
:type: dict
|
||||
:return: The LinkPreviewOpenGraph of this LinkPreviewOpenGraph. # noqa: E501
|
||||
:rtype: LinkPreviewOpenGraph
|
||||
"""
|
||||
return util.deserialize_model(dikt, cls)
|
||||
|
||||
@property
|
||||
def url(self) -> str:
|
||||
"""Gets the url of this LinkPreviewOpenGraph.
|
||||
|
||||
|
||||
:return: The url of this LinkPreviewOpenGraph.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._url
|
||||
|
||||
@url.setter
|
||||
def url(self, url: str):
|
||||
"""Sets the url of this LinkPreviewOpenGraph.
|
||||
|
||||
|
||||
:param url: The url of this LinkPreviewOpenGraph.
|
||||
:type url: str
|
||||
"""
|
||||
if url is None:
|
||||
raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501
|
||||
|
||||
self._url = url
|
||||
|
||||
@property
|
||||
def type(self) -> str:
|
||||
"""Gets the type of this LinkPreviewOpenGraph.
|
||||
|
||||
|
||||
:return: The type of this LinkPreviewOpenGraph.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._type
|
||||
|
||||
@type.setter
|
||||
def type(self, type: str):
|
||||
"""Sets the type of this LinkPreviewOpenGraph.
|
||||
|
||||
|
||||
:param type: The type of this LinkPreviewOpenGraph.
|
||||
:type type: str
|
||||
"""
|
||||
if type is None:
|
||||
raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501
|
||||
|
||||
self._type = type
|
||||
|
||||
@property
|
||||
def information(self) -> LinkPreviewOpenGraphAllOfInformation:
|
||||
"""Gets the information of this LinkPreviewOpenGraph.
|
||||
|
||||
|
||||
:return: The information of this LinkPreviewOpenGraph.
|
||||
:rtype: LinkPreviewOpenGraphAllOfInformation
|
||||
"""
|
||||
return self._information
|
||||
|
||||
@information.setter
|
||||
def information(self, information: LinkPreviewOpenGraphAllOfInformation):
|
||||
"""Sets the information of this LinkPreviewOpenGraph.
|
||||
|
||||
|
||||
:param information: The information of this LinkPreviewOpenGraph.
|
||||
:type information: LinkPreviewOpenGraphAllOfInformation
|
||||
"""
|
||||
if information is None:
|
||||
raise ValueError("Invalid value for `information`, must not be `None`") # noqa: E501
|
||||
|
||||
self._information = information
|
||||
|
||||
@property
|
||||
def http_error_code(self) -> int:
|
||||
"""Gets the http_error_code of this LinkPreviewOpenGraph.
|
||||
|
||||
|
||||
:return: The http_error_code of this LinkPreviewOpenGraph.
|
||||
:rtype: int
|
||||
"""
|
||||
return self._http_error_code
|
||||
|
||||
@http_error_code.setter
|
||||
def http_error_code(self, http_error_code: int):
|
||||
"""Sets the http_error_code of this LinkPreviewOpenGraph.
|
||||
|
||||
|
||||
:param http_error_code: The http_error_code of this LinkPreviewOpenGraph.
|
||||
:type http_error_code: int
|
||||
"""
|
||||
if http_error_code is None:
|
||||
raise ValueError("Invalid value for `http_error_code`, must not be `None`") # noqa: E501
|
||||
|
||||
self._http_error_code = http_error_code
|
|
@ -0,0 +1,87 @@
|
|||
from datetime import date, datetime # noqa: F401
|
||||
|
||||
from typing import List, Dict # noqa: F401
|
||||
|
||||
from chromestatus_openapi.models.base_model import Model
|
||||
from chromestatus_openapi import util
|
||||
|
||||
|
||||
class LinkPreviewOpenGraphAllOfInformation(Model):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self, title=None, description=None): # noqa: E501
|
||||
"""LinkPreviewOpenGraphAllOfInformation - a model defined in OpenAPI
|
||||
|
||||
:param title: The title of this LinkPreviewOpenGraphAllOfInformation. # noqa: E501
|
||||
:type title: str
|
||||
:param description: The description of this LinkPreviewOpenGraphAllOfInformation. # noqa: E501
|
||||
:type description: str
|
||||
"""
|
||||
self.openapi_types = {
|
||||
'title': str,
|
||||
'description': str
|
||||
}
|
||||
|
||||
self.attribute_map = {
|
||||
'title': 'title',
|
||||
'description': 'description'
|
||||
}
|
||||
|
||||
self._title = title
|
||||
self._description = description
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, dikt) -> 'LinkPreviewOpenGraphAllOfInformation':
|
||||
"""Returns the dict as a model
|
||||
|
||||
:param dikt: A dict.
|
||||
:type: dict
|
||||
:return: The LinkPreviewOpenGraph_allOf_information of this LinkPreviewOpenGraphAllOfInformation. # noqa: E501
|
||||
:rtype: LinkPreviewOpenGraphAllOfInformation
|
||||
"""
|
||||
return util.deserialize_model(dikt, cls)
|
||||
|
||||
@property
|
||||
def title(self) -> str:
|
||||
"""Gets the title of this LinkPreviewOpenGraphAllOfInformation.
|
||||
|
||||
|
||||
:return: The title of this LinkPreviewOpenGraphAllOfInformation.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._title
|
||||
|
||||
@title.setter
|
||||
def title(self, title: str):
|
||||
"""Sets the title of this LinkPreviewOpenGraphAllOfInformation.
|
||||
|
||||
|
||||
:param title: The title of this LinkPreviewOpenGraphAllOfInformation.
|
||||
:type title: str
|
||||
"""
|
||||
|
||||
self._title = title
|
||||
|
||||
@property
|
||||
def description(self) -> str:
|
||||
"""Gets the description of this LinkPreviewOpenGraphAllOfInformation.
|
||||
|
||||
|
||||
:return: The description of this LinkPreviewOpenGraphAllOfInformation.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._description
|
||||
|
||||
@description.setter
|
||||
def description(self, description: str):
|
||||
"""Sets the description of this LinkPreviewOpenGraphAllOfInformation.
|
||||
|
||||
|
||||
:param description: The description of this LinkPreviewOpenGraphAllOfInformation.
|
||||
:type description: str
|
||||
"""
|
||||
|
||||
self._description = description
|
|
@ -0,0 +1,149 @@
|
|||
from datetime import date, datetime # noqa: F401
|
||||
|
||||
from typing import List, Dict # noqa: F401
|
||||
|
||||
from chromestatus_openapi.models.base_model import Model
|
||||
from chromestatus_openapi.models.link_preview_open_graph_all_of_information import LinkPreviewOpenGraphAllOfInformation
|
||||
from chromestatus_openapi import util
|
||||
|
||||
from chromestatus_openapi.models.link_preview_open_graph_all_of_information import LinkPreviewOpenGraphAllOfInformation # noqa: E501
|
||||
|
||||
class LinkPreviewSpecs(Model):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self, url=None, type=None, information=None, http_error_code=None): # noqa: E501
|
||||
"""LinkPreviewSpecs - a model defined in OpenAPI
|
||||
|
||||
:param url: The url of this LinkPreviewSpecs. # noqa: E501
|
||||
:type url: str
|
||||
:param type: The type of this LinkPreviewSpecs. # noqa: E501
|
||||
:type type: str
|
||||
:param information: The information of this LinkPreviewSpecs. # noqa: E501
|
||||
:type information: LinkPreviewOpenGraphAllOfInformation
|
||||
:param http_error_code: The http_error_code of this LinkPreviewSpecs. # noqa: E501
|
||||
:type http_error_code: int
|
||||
"""
|
||||
self.openapi_types = {
|
||||
'url': str,
|
||||
'type': str,
|
||||
'information': LinkPreviewOpenGraphAllOfInformation,
|
||||
'http_error_code': int
|
||||
}
|
||||
|
||||
self.attribute_map = {
|
||||
'url': 'url',
|
||||
'type': 'type',
|
||||
'information': 'information',
|
||||
'http_error_code': 'http_error_code'
|
||||
}
|
||||
|
||||
self._url = url
|
||||
self._type = type
|
||||
self._information = information
|
||||
self._http_error_code = http_error_code
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, dikt) -> 'LinkPreviewSpecs':
|
||||
"""Returns the dict as a model
|
||||
|
||||
:param dikt: A dict.
|
||||
:type: dict
|
||||
:return: The LinkPreviewSpecs of this LinkPreviewSpecs. # noqa: E501
|
||||
:rtype: LinkPreviewSpecs
|
||||
"""
|
||||
return util.deserialize_model(dikt, cls)
|
||||
|
||||
@property
|
||||
def url(self) -> str:
|
||||
"""Gets the url of this LinkPreviewSpecs.
|
||||
|
||||
|
||||
:return: The url of this LinkPreviewSpecs.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._url
|
||||
|
||||
@url.setter
|
||||
def url(self, url: str):
|
||||
"""Sets the url of this LinkPreviewSpecs.
|
||||
|
||||
|
||||
:param url: The url of this LinkPreviewSpecs.
|
||||
:type url: str
|
||||
"""
|
||||
if url is None:
|
||||
raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501
|
||||
|
||||
self._url = url
|
||||
|
||||
@property
|
||||
def type(self) -> str:
|
||||
"""Gets the type of this LinkPreviewSpecs.
|
||||
|
||||
|
||||
:return: The type of this LinkPreviewSpecs.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._type
|
||||
|
||||
@type.setter
|
||||
def type(self, type: str):
|
||||
"""Sets the type of this LinkPreviewSpecs.
|
||||
|
||||
|
||||
:param type: The type of this LinkPreviewSpecs.
|
||||
:type type: str
|
||||
"""
|
||||
if type is None:
|
||||
raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501
|
||||
|
||||
self._type = type
|
||||
|
||||
@property
|
||||
def information(self) -> LinkPreviewOpenGraphAllOfInformation:
|
||||
"""Gets the information of this LinkPreviewSpecs.
|
||||
|
||||
|
||||
:return: The information of this LinkPreviewSpecs.
|
||||
:rtype: LinkPreviewOpenGraphAllOfInformation
|
||||
"""
|
||||
return self._information
|
||||
|
||||
@information.setter
|
||||
def information(self, information: LinkPreviewOpenGraphAllOfInformation):
|
||||
"""Sets the information of this LinkPreviewSpecs.
|
||||
|
||||
|
||||
:param information: The information of this LinkPreviewSpecs.
|
||||
:type information: LinkPreviewOpenGraphAllOfInformation
|
||||
"""
|
||||
if information is None:
|
||||
raise ValueError("Invalid value for `information`, must not be `None`") # noqa: E501
|
||||
|
||||
self._information = information
|
||||
|
||||
@property
|
||||
def http_error_code(self) -> int:
|
||||
"""Gets the http_error_code of this LinkPreviewSpecs.
|
||||
|
||||
|
||||
:return: The http_error_code of this LinkPreviewSpecs.
|
||||
:rtype: int
|
||||
"""
|
||||
return self._http_error_code
|
||||
|
||||
@http_error_code.setter
|
||||
def http_error_code(self, http_error_code: int):
|
||||
"""Sets the http_error_code of this LinkPreviewSpecs.
|
||||
|
||||
|
||||
:param http_error_code: The http_error_code of this LinkPreviewSpecs.
|
||||
:type http_error_code: int
|
||||
"""
|
||||
if http_error_code is None:
|
||||
raise ValueError("Invalid value for `http_error_code`, must not be `None`") # noqa: E501
|
||||
|
||||
self._http_error_code = http_error_code
|
|
@ -0,0 +1,149 @@
|
|||
from datetime import date, datetime # noqa: F401
|
||||
|
||||
from typing import List, Dict # noqa: F401
|
||||
|
||||
from chromestatus_openapi.models.base_model import Model
|
||||
from chromestatus_openapi.models.link_preview_open_graph_all_of_information import LinkPreviewOpenGraphAllOfInformation
|
||||
from chromestatus_openapi import util
|
||||
|
||||
from chromestatus_openapi.models.link_preview_open_graph_all_of_information import LinkPreviewOpenGraphAllOfInformation # noqa: E501
|
||||
|
||||
class LinkPreviewWebkitBug(Model):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self, url=None, type=None, information=None, http_error_code=None): # noqa: E501
|
||||
"""LinkPreviewWebkitBug - a model defined in OpenAPI
|
||||
|
||||
:param url: The url of this LinkPreviewWebkitBug. # noqa: E501
|
||||
:type url: str
|
||||
:param type: The type of this LinkPreviewWebkitBug. # noqa: E501
|
||||
:type type: str
|
||||
:param information: The information of this LinkPreviewWebkitBug. # noqa: E501
|
||||
:type information: LinkPreviewOpenGraphAllOfInformation
|
||||
:param http_error_code: The http_error_code of this LinkPreviewWebkitBug. # noqa: E501
|
||||
:type http_error_code: int
|
||||
"""
|
||||
self.openapi_types = {
|
||||
'url': str,
|
||||
'type': str,
|
||||
'information': LinkPreviewOpenGraphAllOfInformation,
|
||||
'http_error_code': int
|
||||
}
|
||||
|
||||
self.attribute_map = {
|
||||
'url': 'url',
|
||||
'type': 'type',
|
||||
'information': 'information',
|
||||
'http_error_code': 'http_error_code'
|
||||
}
|
||||
|
||||
self._url = url
|
||||
self._type = type
|
||||
self._information = information
|
||||
self._http_error_code = http_error_code
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, dikt) -> 'LinkPreviewWebkitBug':
|
||||
"""Returns the dict as a model
|
||||
|
||||
:param dikt: A dict.
|
||||
:type: dict
|
||||
:return: The LinkPreviewWebkitBug of this LinkPreviewWebkitBug. # noqa: E501
|
||||
:rtype: LinkPreviewWebkitBug
|
||||
"""
|
||||
return util.deserialize_model(dikt, cls)
|
||||
|
||||
@property
|
||||
def url(self) -> str:
|
||||
"""Gets the url of this LinkPreviewWebkitBug.
|
||||
|
||||
|
||||
:return: The url of this LinkPreviewWebkitBug.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._url
|
||||
|
||||
@url.setter
|
||||
def url(self, url: str):
|
||||
"""Sets the url of this LinkPreviewWebkitBug.
|
||||
|
||||
|
||||
:param url: The url of this LinkPreviewWebkitBug.
|
||||
:type url: str
|
||||
"""
|
||||
if url is None:
|
||||
raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501
|
||||
|
||||
self._url = url
|
||||
|
||||
@property
|
||||
def type(self) -> str:
|
||||
"""Gets the type of this LinkPreviewWebkitBug.
|
||||
|
||||
|
||||
:return: The type of this LinkPreviewWebkitBug.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._type
|
||||
|
||||
@type.setter
|
||||
def type(self, type: str):
|
||||
"""Sets the type of this LinkPreviewWebkitBug.
|
||||
|
||||
|
||||
:param type: The type of this LinkPreviewWebkitBug.
|
||||
:type type: str
|
||||
"""
|
||||
if type is None:
|
||||
raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501
|
||||
|
||||
self._type = type
|
||||
|
||||
@property
|
||||
def information(self) -> LinkPreviewOpenGraphAllOfInformation:
|
||||
"""Gets the information of this LinkPreviewWebkitBug.
|
||||
|
||||
|
||||
:return: The information of this LinkPreviewWebkitBug.
|
||||
:rtype: LinkPreviewOpenGraphAllOfInformation
|
||||
"""
|
||||
return self._information
|
||||
|
||||
@information.setter
|
||||
def information(self, information: LinkPreviewOpenGraphAllOfInformation):
|
||||
"""Sets the information of this LinkPreviewWebkitBug.
|
||||
|
||||
|
||||
:param information: The information of this LinkPreviewWebkitBug.
|
||||
:type information: LinkPreviewOpenGraphAllOfInformation
|
||||
"""
|
||||
if information is None:
|
||||
raise ValueError("Invalid value for `information`, must not be `None`") # noqa: E501
|
||||
|
||||
self._information = information
|
||||
|
||||
@property
|
||||
def http_error_code(self) -> int:
|
||||
"""Gets the http_error_code of this LinkPreviewWebkitBug.
|
||||
|
||||
|
||||
:return: The http_error_code of this LinkPreviewWebkitBug.
|
||||
:rtype: int
|
||||
"""
|
||||
return self._http_error_code
|
||||
|
||||
@http_error_code.setter
|
||||
def http_error_code(self, http_error_code: int):
|
||||
"""Sets the http_error_code of this LinkPreviewWebkitBug.
|
||||
|
||||
|
||||
:param http_error_code: The http_error_code of this LinkPreviewWebkitBug.
|
||||
:type http_error_code: int
|
||||
"""
|
||||
if http_error_code is None:
|
||||
raise ValueError("Invalid value for `http_error_code`, must not be `None`") # noqa: E501
|
||||
|
||||
self._http_error_code = http_error_code
|
|
@ -0,0 +1,179 @@
|
|||
from datetime import date, datetime # noqa: F401
|
||||
|
||||
from typing import List, Dict # noqa: F401
|
||||
|
||||
from chromestatus_openapi.models.base_model import Model
|
||||
from chromestatus_openapi.models.feature_link import FeatureLink
|
||||
from chromestatus_openapi import util
|
||||
|
||||
from chromestatus_openapi.models.feature_link import FeatureLink # noqa: E501
|
||||
|
||||
class OutstandingReview(Model):
|
||||
"""NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self, review_link=None, feature=None, current_stage=None, estimated_start_milestone=None, estimated_end_milestone=None): # noqa: E501
|
||||
"""OutstandingReview - a model defined in OpenAPI
|
||||
|
||||
:param review_link: The review_link of this OutstandingReview. # noqa: E501
|
||||
:type review_link: str
|
||||
:param feature: The feature of this OutstandingReview. # noqa: E501
|
||||
:type feature: FeatureLink
|
||||
:param current_stage: The current_stage of this OutstandingReview. # noqa: E501
|
||||
:type current_stage: str
|
||||
:param estimated_start_milestone: The estimated_start_milestone of this OutstandingReview. # noqa: E501
|
||||
:type estimated_start_milestone: int
|
||||
:param estimated_end_milestone: The estimated_end_milestone of this OutstandingReview. # noqa: E501
|
||||
:type estimated_end_milestone: int
|
||||
"""
|
||||
self.openapi_types = {
|
||||
'review_link': str,
|
||||
'feature': FeatureLink,
|
||||
'current_stage': str,
|
||||
'estimated_start_milestone': int,
|
||||
'estimated_end_milestone': int
|
||||
}
|
||||
|
||||
self.attribute_map = {
|
||||
'review_link': 'review_link',
|
||||
'feature': 'feature',
|
||||
'current_stage': 'current_stage',
|
||||
'estimated_start_milestone': 'estimated_start_milestone',
|
||||
'estimated_end_milestone': 'estimated_end_milestone'
|
||||
}
|
||||
|
||||
self._review_link = review_link
|
||||
self._feature = feature
|
||||
self._current_stage = current_stage
|
||||
self._estimated_start_milestone = estimated_start_milestone
|
||||
self._estimated_end_milestone = estimated_end_milestone
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, dikt) -> 'OutstandingReview':
|
||||
"""Returns the dict as a model
|
||||
|
||||
:param dikt: A dict.
|
||||
:type: dict
|
||||
:return: The OutstandingReview of this OutstandingReview. # noqa: E501
|
||||
:rtype: OutstandingReview
|
||||
"""
|
||||
return util.deserialize_model(dikt, cls)
|
||||
|
||||
@property
|
||||
def review_link(self) -> str:
|
||||
"""Gets the review_link of this OutstandingReview.
|
||||
|
||||
|
||||
:return: The review_link of this OutstandingReview.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._review_link
|
||||
|
||||
@review_link.setter
|
||||
def review_link(self, review_link: str):
|
||||
"""Sets the review_link of this OutstandingReview.
|
||||
|
||||
|
||||
:param review_link: The review_link of this OutstandingReview.
|
||||
:type review_link: str
|
||||
"""
|
||||
if review_link is None:
|
||||
raise ValueError("Invalid value for `review_link`, must not be `None`") # noqa: E501
|
||||
|
||||
self._review_link = review_link
|
||||
|
||||
@property
|
||||
def feature(self) -> FeatureLink:
|
||||
"""Gets the feature of this OutstandingReview.
|
||||
|
||||
|
||||
:return: The feature of this OutstandingReview.
|
||||
:rtype: FeatureLink
|
||||
"""
|
||||
return self._feature
|
||||
|
||||
@feature.setter
|
||||
def feature(self, feature: FeatureLink):
|
||||
"""Sets the feature of this OutstandingReview.
|
||||
|
||||
|
||||
:param feature: The feature of this OutstandingReview.
|
||||
:type feature: FeatureLink
|
||||
"""
|
||||
if feature is None:
|
||||
raise ValueError("Invalid value for `feature`, must not be `None`") # noqa: E501
|
||||
|
||||
self._feature = feature
|
||||
|
||||
@property
|
||||
def current_stage(self) -> str:
|
||||
"""Gets the current_stage of this OutstandingReview.
|
||||
|
||||
The development stage that the feature has reached: - [`incubating`](https://www.chromium.org/blink/launching-features/#start-incubating) - [`prototyping`](https://www.chromium.org/blink/launching-features/#prototyping) - [`dev-trial`](https://www.chromium.org/blink/launching-features/#dev-trials) - [`wide-review`](https://www.chromium.org/blink/launching-features/#widen-review) - [`origin-trial`](https://www.chromium.org/blink/launching-features/#origin-trials) - [`shipping`](https://www.chromium.org/blink/launching-features/#new-feature-prepare-to-ship) - `shipped` - The feature is enabled by default in Chromium. # noqa: E501
|
||||
|
||||
:return: The current_stage of this OutstandingReview.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._current_stage
|
||||
|
||||
@current_stage.setter
|
||||
def current_stage(self, current_stage: str):
|
||||
"""Sets the current_stage of this OutstandingReview.
|
||||
|
||||
The development stage that the feature has reached: - [`incubating`](https://www.chromium.org/blink/launching-features/#start-incubating) - [`prototyping`](https://www.chromium.org/blink/launching-features/#prototyping) - [`dev-trial`](https://www.chromium.org/blink/launching-features/#dev-trials) - [`wide-review`](https://www.chromium.org/blink/launching-features/#widen-review) - [`origin-trial`](https://www.chromium.org/blink/launching-features/#origin-trials) - [`shipping`](https://www.chromium.org/blink/launching-features/#new-feature-prepare-to-ship) - `shipped` - The feature is enabled by default in Chromium. # noqa: E501
|
||||
|
||||
:param current_stage: The current_stage of this OutstandingReview.
|
||||
:type current_stage: str
|
||||
"""
|
||||
allowed_values = ["incubating", "prototyping", "dev-trial", "wide-review", "origin-trial", "shipping", "shipped"] # noqa: E501
|
||||
if current_stage not in allowed_values:
|
||||
raise ValueError(
|
||||
"Invalid value for `current_stage` ({0}), must be one of {1}"
|
||||
.format(current_stage, allowed_values)
|
||||
)
|
||||
|
||||
self._current_stage = current_stage
|
||||
|
||||
@property
|
||||
def estimated_start_milestone(self) -> int:
|
||||
"""Gets the estimated_start_milestone of this OutstandingReview.
|
||||
|
||||
|
||||
:return: The estimated_start_milestone of this OutstandingReview.
|
||||
:rtype: int
|
||||
"""
|
||||
return self._estimated_start_milestone
|
||||
|
||||
@estimated_start_milestone.setter
|
||||
def estimated_start_milestone(self, estimated_start_milestone: int):
|
||||
"""Sets the estimated_start_milestone of this OutstandingReview.
|
||||
|
||||
|
||||
:param estimated_start_milestone: The estimated_start_milestone of this OutstandingReview.
|
||||
:type estimated_start_milestone: int
|
||||
"""
|
||||
|
||||
self._estimated_start_milestone = estimated_start_milestone
|
||||
|
||||
@property
|
||||
def estimated_end_milestone(self) -> int:
|
||||
"""Gets the estimated_end_milestone of this OutstandingReview.
|
||||
|
||||
|
||||
:return: The estimated_end_milestone of this OutstandingReview.
|
||||
:rtype: int
|
||||
"""
|
||||
return self._estimated_end_milestone
|
||||
|
||||
@estimated_end_milestone.setter
|
||||
def estimated_end_milestone(self, estimated_end_milestone: int):
|
||||
"""Sets the estimated_end_milestone of this OutstandingReview.
|
||||
|
||||
|
||||
:param estimated_end_milestone: The estimated_end_milestone of this OutstandingReview.
|
||||
:type estimated_end_milestone: int
|
||||
"""
|
||||
|
||||
self._estimated_end_milestone = estimated_end_milestone
|
|
@ -91,6 +91,37 @@ paths:
|
|||
- XsrfToken: []
|
||||
summary: List all components and possible users
|
||||
x-openapi-router-controller: chromestatus_openapi.controllers.default_controller
|
||||
/external_reviews/{review_group}:
|
||||
get:
|
||||
operationId: list_external_reviews
|
||||
parameters:
|
||||
- description: |
|
||||
Which review group to focus on:
|
||||
* `tag` - The W3C TAG
|
||||
* `gecko` - The rendering engine that powers Mozilla Firefox
|
||||
* `webkit` - The rendering engine that powers Apple Safari
|
||||
explode: false
|
||||
in: path
|
||||
name: review_group
|
||||
required: true
|
||||
schema:
|
||||
enum:
|
||||
- tag
|
||||
- gecko
|
||||
- webkit
|
||||
type: string
|
||||
style: simple
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ExternalReviewsResponse'
|
||||
description: "List of all the outstanding reviews, ordered by urgency."
|
||||
"404":
|
||||
description: The review group wasn't recognized.
|
||||
summary: List features whose external reviews are incomplete
|
||||
x-openapi-router-controller: chromestatus_openapi.controllers.default_controller
|
||||
/feature-latency:
|
||||
get:
|
||||
operationId: list_feature_latency
|
||||
|
@ -397,6 +428,90 @@ components:
|
|||
- shipped_milestone
|
||||
title: FeatureLatency
|
||||
type: object
|
||||
ExternalReviewsResponse:
|
||||
example:
|
||||
link_previews:
|
||||
- null
|
||||
- null
|
||||
reviews:
|
||||
- feature:
|
||||
name: WebGPU
|
||||
id: 5703707724349440
|
||||
estimated_end_milestone: 6
|
||||
review_link: http://example.com/aeiou
|
||||
current_stage: incubating
|
||||
estimated_start_milestone: 0
|
||||
- feature:
|
||||
name: WebGPU
|
||||
id: 5703707724349440
|
||||
estimated_end_milestone: 6
|
||||
review_link: http://example.com/aeiou
|
||||
current_stage: incubating
|
||||
estimated_start_milestone: 0
|
||||
properties:
|
||||
reviews:
|
||||
items:
|
||||
$ref: '#/components/schemas/OutstandingReview'
|
||||
title: reviews
|
||||
type: array
|
||||
link_previews:
|
||||
items:
|
||||
$ref: '#/components/schemas/LinkPreview'
|
||||
title: link_previews
|
||||
type: array
|
||||
required:
|
||||
- link_previews
|
||||
- reviews
|
||||
title: ExternalReviewsResponse
|
||||
type: object
|
||||
OutstandingReview:
|
||||
example:
|
||||
feature:
|
||||
name: WebGPU
|
||||
id: 5703707724349440
|
||||
estimated_end_milestone: 6
|
||||
review_link: http://example.com/aeiou
|
||||
current_stage: incubating
|
||||
estimated_start_milestone: 0
|
||||
properties:
|
||||
review_link:
|
||||
format: url
|
||||
title: review_link
|
||||
type: string
|
||||
feature:
|
||||
$ref: '#/components/schemas/FeatureLink'
|
||||
current_stage:
|
||||
description: |
|
||||
The development stage that the feature has reached:
|
||||
- [`incubating`](https://www.chromium.org/blink/launching-features/#start-incubating)
|
||||
- [`prototyping`](https://www.chromium.org/blink/launching-features/#prototyping)
|
||||
- [`dev-trial`](https://www.chromium.org/blink/launching-features/#dev-trials)
|
||||
- [`wide-review`](https://www.chromium.org/blink/launching-features/#widen-review)
|
||||
- [`origin-trial`](https://www.chromium.org/blink/launching-features/#origin-trials)
|
||||
- [`shipping`](https://www.chromium.org/blink/launching-features/#new-feature-prepare-to-ship)
|
||||
- `shipped` - The feature is enabled by default in Chromium.
|
||||
enum:
|
||||
- incubating
|
||||
- prototyping
|
||||
- dev-trial
|
||||
- wide-review
|
||||
- origin-trial
|
||||
- shipping
|
||||
- shipped
|
||||
title: current_stage
|
||||
type: string
|
||||
estimated_start_milestone:
|
||||
title: estimated_start_milestone
|
||||
type: integer
|
||||
estimated_end_milestone:
|
||||
title: estimated_end_milestone
|
||||
type: integer
|
||||
required:
|
||||
- current_stage
|
||||
- feature
|
||||
- review_link
|
||||
title: OutstandingReview
|
||||
type: object
|
||||
FeatureLink:
|
||||
example:
|
||||
name: WebGPU
|
||||
|
@ -415,6 +530,160 @@ components:
|
|||
- name
|
||||
title: FeatureLink
|
||||
type: object
|
||||
LinkPreviewBase:
|
||||
properties:
|
||||
url:
|
||||
format: url
|
||||
title: url
|
||||
type: string
|
||||
type:
|
||||
title: type
|
||||
type: string
|
||||
information:
|
||||
title: information
|
||||
type: object
|
||||
http_error_code:
|
||||
title: http_error_code
|
||||
type: integer
|
||||
required:
|
||||
- http_error_code
|
||||
- information
|
||||
- type
|
||||
- url
|
||||
title: LinkPreviewBase
|
||||
type: object
|
||||
LinkPreview:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/LinkPreviewBase'
|
||||
- discriminator:
|
||||
mapping:
|
||||
github_issue: LinkPreviewGithubIssue
|
||||
github_markdown: LinkPreviewGithubMarkdown
|
||||
github_pull_request: LinkPreviewGithubPullRequest
|
||||
mdn_docs: LinkPreviewMdnDocs
|
||||
google_docs: LinkPreviewGoogleDocs
|
||||
mozilla_bug: LinkPreviewMozillaBug
|
||||
webkit_bug: LinkPreviewWebkitBug
|
||||
specs: LinkPreviewSpecs
|
||||
propertyName: type
|
||||
title: LinkPreview
|
||||
LinkPreviewGithubIssue:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/LinkPreviewBase'
|
||||
- properties:
|
||||
information:
|
||||
$ref: '#/components/schemas/LinkPreviewGithubIssue_allOf_information'
|
||||
required:
|
||||
- information
|
||||
type: object
|
||||
title: LinkPreviewGithubIssue
|
||||
LinkPreviewGithubPullRequest:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/LinkPreviewGithubIssue'
|
||||
LinkPreviewGithubMarkdown:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/LinkPreviewBase'
|
||||
- properties:
|
||||
information:
|
||||
$ref: '#/components/schemas/LinkPreviewGithubMarkdown_allOf_information'
|
||||
required:
|
||||
- information
|
||||
type: object
|
||||
LinkPreviewOpenGraph:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/LinkPreviewBase'
|
||||
- properties:
|
||||
information:
|
||||
$ref: '#/components/schemas/LinkPreviewOpenGraph_allOf_information'
|
||||
required:
|
||||
- information
|
||||
type: object
|
||||
title: LinkPreviewOpenGraph
|
||||
LinkPreviewMdnDocs:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/LinkPreviewOpenGraph'
|
||||
LinkPreviewGoogleDocs:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/LinkPreviewOpenGraph'
|
||||
LinkPreviewMozillaBug:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/LinkPreviewOpenGraph'
|
||||
LinkPreviewWebkitBug:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/LinkPreviewOpenGraph'
|
||||
LinkPreviewSpecs:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/LinkPreviewOpenGraph'
|
||||
LinkPreviewGithubIssue_allOf_information:
|
||||
properties:
|
||||
url:
|
||||
format: url
|
||||
title: url
|
||||
type: string
|
||||
number:
|
||||
title: number
|
||||
type: integer
|
||||
title:
|
||||
title: title
|
||||
type: string
|
||||
user_login:
|
||||
title: user_login
|
||||
type: string
|
||||
state:
|
||||
enum:
|
||||
- open
|
||||
- closed
|
||||
title: state
|
||||
type: string
|
||||
state_reason:
|
||||
enum:
|
||||
- completed
|
||||
- reopened
|
||||
- not_planned
|
||||
title: state_reason
|
||||
type: string
|
||||
assignee_login:
|
||||
title: assignee_login
|
||||
type: string
|
||||
created_at:
|
||||
format: date
|
||||
title: created_at
|
||||
type: string
|
||||
updated_at:
|
||||
format: date
|
||||
title: updated_at
|
||||
type: string
|
||||
closed_at:
|
||||
format: date
|
||||
title: closed_at
|
||||
type: string
|
||||
labels:
|
||||
items:
|
||||
type: string
|
||||
title: labels
|
||||
type: array
|
||||
title: LinkPreviewGithubIssue_allOf_information
|
||||
type: object
|
||||
LinkPreviewGithubMarkdown_allOf_information:
|
||||
properties:
|
||||
_parsed_title:
|
||||
title: _parsed_title
|
||||
type: string
|
||||
content:
|
||||
title: content
|
||||
type: string
|
||||
title: LinkPreviewGithubMarkdown_allOf_information
|
||||
type: object
|
||||
LinkPreviewOpenGraph_allOf_information:
|
||||
properties:
|
||||
title:
|
||||
title: title
|
||||
type: string
|
||||
description:
|
||||
title: description
|
||||
type: string
|
||||
title: LinkPreviewOpenGraph_allOf_information
|
||||
type: object
|
||||
securitySchemes:
|
||||
XsrfToken:
|
||||
in: header
|
||||
|
|
|
@ -4,6 +4,7 @@ from flask import json
|
|||
|
||||
from chromestatus_openapi.models.component_users_request import ComponentUsersRequest # noqa: E501
|
||||
from chromestatus_openapi.models.components_users_response import ComponentsUsersResponse # noqa: E501
|
||||
from chromestatus_openapi.models.external_reviews_response import ExternalReviewsResponse # noqa: E501
|
||||
from chromestatus_openapi.models.feature_latency import FeatureLatency # noqa: E501
|
||||
from chromestatus_openapi.models.review_latency import ReviewLatency # noqa: E501
|
||||
from chromestatus_openapi.models.spec_mentor import SpecMentor # noqa: E501
|
||||
|
@ -48,6 +49,21 @@ class TestDefaultController(BaseTestCase):
|
|||
self.assert200(response,
|
||||
'Response body is : ' + response.data.decode('utf-8'))
|
||||
|
||||
def test_list_external_reviews(self):
|
||||
"""Test case for list_external_reviews
|
||||
|
||||
List features whose external reviews are incomplete
|
||||
"""
|
||||
headers = {
|
||||
'Accept': 'application/json',
|
||||
}
|
||||
response = self.client.open(
|
||||
'/api/v0/external_reviews/{review_group}'.format(review_group='review_group_example'),
|
||||
method='GET',
|
||||
headers=headers)
|
||||
self.assert200(response,
|
||||
'Response body is : ' + response.data.decode('utf-8'))
|
||||
|
||||
def test_list_feature_latency(self):
|
||||
"""Test case for list_feature_latency
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
# https://stackoverflow.com/a/33533514
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
from typing import Any, Optional
|
||||
|
||||
from google.cloud import ndb # type: ignore
|
||||
|
||||
|
@ -26,6 +26,19 @@ from internals.core_enums import *
|
|||
import settings
|
||||
|
||||
|
||||
class ReviewResultProperty(ndb.StringProperty):
|
||||
"""A StringProperty representing the result of an external review.
|
||||
|
||||
These are the values after the `:` in
|
||||
https://github.com/mozilla/standards-positions/labels?q=position%3A,
|
||||
https://github.com/WebKit/standards-positions/labels?q=position%3A, and
|
||||
https://github.com/w3ctag/design-reviews/labels?q=resolution%3A, plus the special value "closed"
|
||||
to represent a review that was closed without a position.
|
||||
"""
|
||||
|
||||
CLOSED_WITHOUT_POSITION = 'closed'
|
||||
|
||||
|
||||
class FeatureEntry(ndb.Model): # Copy from Feature
|
||||
"""This is the main representation of a feature that we are tracking."""
|
||||
|
||||
|
@ -122,7 +135,7 @@ class FeatureEntry(ndb.Model): # Copy from Feature
|
|||
all_platforms_descr = ndb.TextProperty()
|
||||
tag_review = ndb.StringProperty()
|
||||
tag_review_status = ndb.IntegerProperty(default=REVIEW_PENDING)
|
||||
tag_review_resolution = ndb.StringProperty()
|
||||
tag_review_resolution: Optional[ReviewResultProperty] = ReviewResultProperty()
|
||||
non_oss_deps = ndb.TextProperty()
|
||||
anticipated_spec_changes = ndb.TextProperty()
|
||||
|
||||
|
@ -130,15 +143,35 @@ class FeatureEntry(ndb.Model): # Copy from Feature
|
|||
safari_views = ndb.IntegerProperty(required=True, default=NO_PUBLIC_SIGNALS)
|
||||
web_dev_views = ndb.IntegerProperty(required=True, default=DEV_NO_SIGNALS)
|
||||
ff_views_link = ndb.StringProperty()
|
||||
ff_views_link_result = ndb.StringProperty()
|
||||
ff_views_link_result: Optional[ReviewResultProperty] = ReviewResultProperty()
|
||||
safari_views_link = ndb.StringProperty()
|
||||
safari_views_link_result = ndb.StringProperty()
|
||||
safari_views_link_result: Optional[ReviewResultProperty] = ReviewResultProperty()
|
||||
web_dev_views_link = ndb.StringProperty()
|
||||
ff_views_notes = ndb.StringProperty()
|
||||
safari_views_notes = ndb.TextProperty()
|
||||
web_dev_views_notes = ndb.TextProperty()
|
||||
other_views_notes = ndb.TextProperty()
|
||||
|
||||
@ndb.ComputedProperty
|
||||
def has_open_tag_review(self):
|
||||
return self.tag_review is not None and self.tag_review_resolution is None
|
||||
|
||||
@ndb.ComputedProperty
|
||||
def has_open_ff_review(self):
|
||||
return (
|
||||
self.ff_views not in [IN_DEV, SHIPPED, SIGNALS_NA]
|
||||
and self.ff_views_link is not None
|
||||
and self.ff_views_link_result is None
|
||||
)
|
||||
|
||||
@ndb.ComputedProperty
|
||||
def has_open_safari_review(self):
|
||||
return (
|
||||
self.safari_views not in [IN_DEV, SHIPPED, SIGNALS_NA]
|
||||
and self.safari_views_link is not None
|
||||
and self.safari_views_link_result is None
|
||||
)
|
||||
|
||||
# Gate: Security & Privacy
|
||||
security_risks = ndb.TextProperty()
|
||||
security_review_status = ndb.IntegerProperty(default=REVIEW_PENDING)
|
||||
|
|
|
@ -23,9 +23,12 @@ from google.cloud import ndb # type: ignore
|
|||
|
||||
from framework import cloud_tasks_helpers
|
||||
from framework.basehandlers import FlaskHandler
|
||||
from internals.core_models import FeatureEntry
|
||||
from internals.core_models import FeatureEntry, ReviewResultProperty
|
||||
from internals.link_helpers import (
|
||||
GECKO_REVIEW_URL_PATTERN,
|
||||
LINK_TYPE_GITHUB_ISSUE,
|
||||
TAG_REVIEW_URL_PATTERN,
|
||||
WEBKIT_REVIEW_URL_PATTERN,
|
||||
Link,
|
||||
)
|
||||
|
||||
|
@ -87,7 +90,6 @@ def update_feature_links(fe: FeatureEntry, changed_fields: list[tuple[str, Any,
|
|||
logging.info(
|
||||
f'Indexed feature_link {feature_link.url} to {feature_link.key.integer_id()} for feature {fe.key.integer_id()}'
|
||||
)
|
||||
_denormalize_feature_link_into_entries(feature_link, [fe])
|
||||
|
||||
|
||||
def _get_index_link(link: Link, fe: FeatureEntry, should_parse_new_link: bool = False) -> FeatureLinks | None:
|
||||
|
@ -117,6 +119,7 @@ def _get_index_link(link: Link, fe: FeatureEntry, should_parse_new_link: bool =
|
|||
http_error_code=link.http_error_code
|
||||
)
|
||||
|
||||
_denormalize_feature_link_into_entries(feature_link, [fe])
|
||||
return feature_link
|
||||
|
||||
|
||||
|
@ -137,7 +140,9 @@ def _remove_link(link: Link, fe: FeatureEntry) -> None:
|
|||
logging.info(f'Delete indexed link {link.url}')
|
||||
|
||||
|
||||
def _get_views_from_label(feature_link: FeatureLinks, position_prefix: str) -> Optional[str]:
|
||||
def _get_review_result_from_feature_link(
|
||||
feature_link: FeatureLinks, position_prefix: str
|
||||
) -> Optional[str]:
|
||||
"""Returns the external reviewer's views expressed in feature_link.
|
||||
|
||||
Params:
|
||||
|
@ -148,6 +153,8 @@ def _get_views_from_label(feature_link: FeatureLinks, position_prefix: str) -> O
|
|||
for label in feature_link.information.get('labels', []):
|
||||
if label.lower().startswith(position_prefix):
|
||||
return label[len(position_prefix) :]
|
||||
if feature_link.information.get('state', None) == 'closed':
|
||||
return ReviewResultProperty.CLOSED_WITHOUT_POSITION
|
||||
return None
|
||||
|
||||
|
||||
|
@ -175,39 +182,41 @@ def _denormalize_feature_link_into_entries(
|
|||
keys=[ndb.Key('FeatureEntry', id) for id in feature_link.feature_ids]
|
||||
)
|
||||
for fe in possible_entries:
|
||||
if fe is None:
|
||||
continue
|
||||
if (
|
||||
'github.com/w3ctag/design-reviews/' in feature_link.url
|
||||
TAG_REVIEW_URL_PATTERN.search(feature_link.url)
|
||||
and fe.tag_review == feature_link.url
|
||||
):
|
||||
_put_if_changed(
|
||||
fe,
|
||||
'tag_review_resolution',
|
||||
_get_views_from_label(feature_link, 'resolution: '),
|
||||
_get_review_result_from_feature_link(feature_link, 'resolution: '),
|
||||
)
|
||||
if (
|
||||
'github.com/mozilla/standards-positions/' in feature_link.url
|
||||
GECKO_REVIEW_URL_PATTERN.search(feature_link.url)
|
||||
and fe.ff_views_link == feature_link.url
|
||||
):
|
||||
_put_if_changed(
|
||||
fe,
|
||||
'ff_views_link_result',
|
||||
_get_views_from_label(feature_link, 'position: '),
|
||||
_get_review_result_from_feature_link(feature_link, 'position: '),
|
||||
)
|
||||
if (
|
||||
'github.com/WebKit/standards-positions/' in feature_link.url
|
||||
WEBKIT_REVIEW_URL_PATTERN.search(feature_link.url)
|
||||
and fe.safari_views_link == feature_link.url
|
||||
):
|
||||
_put_if_changed(
|
||||
fe,
|
||||
'safari_views_link_result',
|
||||
_get_views_from_label(feature_link, 'position: '),
|
||||
_get_review_result_from_feature_link(feature_link, 'position: '),
|
||||
)
|
||||
|
||||
|
||||
def _get_feature_links(feature_id: int) -> list[FeatureLinks]:
|
||||
"""Return a list of FeatureLinks for a given feature id"""
|
||||
def _get_feature_links(feature_ids: list[int]) -> list[FeatureLinks]:
|
||||
"""Return a list of FeatureLinks for the given feature ids"""
|
||||
feature_links = FeatureLinks.query(
|
||||
FeatureLinks.feature_ids == feature_id).fetch(None)
|
||||
FeatureLinks.feature_ids.IN(feature_ids)).fetch(None) if feature_ids else []
|
||||
return feature_links if feature_links else []
|
||||
|
||||
|
||||
|
@ -217,7 +226,18 @@ def get_by_feature_id(feature_id: int, update_stale_links: bool) -> tuple[list[d
|
|||
This is used by the api to return json to the client.
|
||||
update_stale_links: if True, then trigger a background task to update the information of the links.
|
||||
"""
|
||||
feature_links = _get_feature_links(feature_id)
|
||||
return get_by_feature_ids([feature_id], update_stale_links)
|
||||
|
||||
|
||||
def get_by_feature_ids(
|
||||
feature_ids: list[int], update_stale_links: bool
|
||||
) -> tuple[list[dict], bool]:
|
||||
"""Return a list of dicts of FeatureLinks for the given feature ids
|
||||
The returned dicts only include the url, type, and information fields.
|
||||
This is used by the api to return json to the client.
|
||||
update_stale_links: if True, then trigger a background task to update the information of the links.
|
||||
"""
|
||||
feature_links = _get_feature_links(feature_ids)
|
||||
stale_time = datetime.datetime.now(
|
||||
tz=datetime.timezone.utc) - datetime.timedelta(minutes=LINK_STALE_MINUTES)
|
||||
stale_time = stale_time.replace(tzinfo=None)
|
||||
|
@ -227,7 +247,7 @@ def get_by_feature_id(feature_id: int, update_stale_links: bool) -> tuple[list[d
|
|||
|
||||
if has_stale_links and update_stale_links:
|
||||
logging.info(
|
||||
f'Found {len(stale_feature_links)} stale links for feature_id {feature_id}, send links to cloud task')
|
||||
f'Found {len(stale_feature_links)} stale links for feature_ids {feature_ids}, send links to cloud task')
|
||||
|
||||
feature_link_ids = [link.key.id() for link in stale_feature_links]
|
||||
cloud_tasks_helpers.enqueue_task(
|
||||
|
@ -306,7 +326,7 @@ def batch_index_feature_entries(fes: list[FeatureEntry], skip_existing: bool) ->
|
|||
|
||||
for fe in fes:
|
||||
if skip_existing:
|
||||
feature_links = _get_feature_links(fe.key.integer_id())
|
||||
feature_links = _get_feature_links([fe.key.integer_id()])
|
||||
if len(feature_links) > 0:
|
||||
continue
|
||||
|
||||
|
@ -315,7 +335,7 @@ def batch_index_feature_entries(fes: list[FeatureEntry], skip_existing: bool) ->
|
|||
for url in urls:
|
||||
link = Link(url)
|
||||
if link.type:
|
||||
fl = _get_index_link(link, fe, should_parse_new_link=False)
|
||||
fl = _get_index_link(link, fe, should_parse_new_link=True)
|
||||
if fl:
|
||||
feature_links.append(fl)
|
||||
|
||||
|
|
|
@ -258,6 +258,30 @@ class LinkTest(testing_config.CustomTestCase):
|
|||
FeatureEntry.get_by_id(self.feature_id).ff_views_link_result, 'positive'
|
||||
)
|
||||
|
||||
@mock.patch.object(Link, '_parse_github_issue')
|
||||
def test_adding_link_to_second_feature_saves_position_in_second_feature(
|
||||
self, mockParse: mock.MagicMock
|
||||
):
|
||||
mockParse.return_value = {'labels': ['position: defer']}
|
||||
|
||||
url = 'https://github.com/mozilla/standards-positions/issues/247'
|
||||
changed_fields = [('ff_views_link', None, url)]
|
||||
self.mock_user_change_fields(changed_fields)
|
||||
self.assertEqual(1, mockParse.call_count)
|
||||
self.assertEqual(
|
||||
FeatureEntry.get_by_id(self.feature_id).ff_views_link_result, 'defer'
|
||||
)
|
||||
self.assertEqual(
|
||||
FeatureEntry.get_by_id(self.feature2_id).ff_views_link_result, None
|
||||
)
|
||||
self.mock_user_change_fields(changed_fields, self.feature2)
|
||||
self.assertEqual(
|
||||
1, mockParse.call_count, 'Should re-use the link created for the first feature.'
|
||||
)
|
||||
self.assertEqual(
|
||||
FeatureEntry.get_by_id(self.feature2_id).ff_views_link_result, 'defer'
|
||||
)
|
||||
|
||||
@mock.patch.object(Link, '_parse_github_issue')
|
||||
def test_denormalizing_github_link_without_information_doesnt_crash(
|
||||
self, mockParse: mock.MagicMock
|
||||
|
|
|
@ -68,6 +68,14 @@ LINK_TYPES_REGEX = {
|
|||
LINK_TYPE_WEB: re.compile(r'https?://.*'),
|
||||
}
|
||||
|
||||
TAG_REVIEW_URL_PATTERN = re.compile(r'github.com/w3ctag/design-reviews/', re.IGNORECASE)
|
||||
GECKO_REVIEW_URL_PATTERN = re.compile(
|
||||
r'github.com/mozilla/standards-positions/', re.IGNORECASE
|
||||
)
|
||||
WEBKIT_REVIEW_URL_PATTERN = re.compile(
|
||||
r'github.com/WebKit/standards-positions/', re.IGNORECASE
|
||||
)
|
||||
|
||||
URL_REGEX = re.compile(r'(https?://\S+)')
|
||||
|
||||
TIMEOUT = 30 # We wait at most 30 seconds for each web page request.
|
||||
|
|
86
main.py
|
@ -13,53 +13,50 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import threading
|
||||
from dataclasses import dataclass, field
|
||||
from typing import Any, Type
|
||||
import threading
|
||||
|
||||
from api import accounts_api
|
||||
from api import blink_components_api
|
||||
from api import component_users
|
||||
from api import components_users
|
||||
from api import channels_api
|
||||
from api import comments_api
|
||||
from api import cues_api
|
||||
from api import features_api
|
||||
from api import feature_latency_api
|
||||
from api import feature_links_api
|
||||
from api import login_api
|
||||
from api import logout_api
|
||||
from api import metricsdata
|
||||
from api import origin_trials_api
|
||||
from api import permissions_api
|
||||
from api import processes_api
|
||||
from api import reviews_api
|
||||
from api import review_latency_api
|
||||
from api import settings_api
|
||||
from api import spec_mentors_api
|
||||
from api import stages_api
|
||||
from api import stars_api
|
||||
from api import token_refresh_api
|
||||
from framework import basehandlers
|
||||
from framework import csp
|
||||
from framework import sendemail
|
||||
from internals import detect_intent
|
||||
from internals import fetchmetrics
|
||||
from internals import feature_links
|
||||
from internals import maintenance_scripts
|
||||
from internals import notifier
|
||||
from internals import data_backup
|
||||
from internals import inactive_users
|
||||
from internals import search_fulltext
|
||||
from internals import reminders
|
||||
from pages import featurelist
|
||||
from pages import guide
|
||||
from pages import intentpreview
|
||||
from pages import metrics
|
||||
from pages import ot_requests
|
||||
from pages import users
|
||||
import settings
|
||||
|
||||
from api import (
|
||||
accounts_api,
|
||||
blink_components_api,
|
||||
channels_api,
|
||||
comments_api,
|
||||
component_users,
|
||||
components_users,
|
||||
cues_api,
|
||||
external_reviews_api,
|
||||
feature_latency_api,
|
||||
feature_links_api,
|
||||
features_api,
|
||||
login_api,
|
||||
logout_api,
|
||||
metricsdata,
|
||||
origin_trials_api,
|
||||
permissions_api,
|
||||
processes_api,
|
||||
review_latency_api,
|
||||
reviews_api,
|
||||
settings_api,
|
||||
spec_mentors_api,
|
||||
stages_api,
|
||||
stars_api,
|
||||
token_refresh_api,
|
||||
)
|
||||
from framework import basehandlers, csp, sendemail
|
||||
from internals import (
|
||||
data_backup,
|
||||
detect_intent,
|
||||
feature_links,
|
||||
fetchmetrics,
|
||||
inactive_users,
|
||||
maintenance_scripts,
|
||||
notifier,
|
||||
reminders,
|
||||
search_fulltext,
|
||||
)
|
||||
from pages import featurelist, guide, intentpreview, metrics, ot_requests, users
|
||||
|
||||
# Patch treading library to work-around bug with Google Cloud Logging.
|
||||
original_delete = threading.Thread._delete # type: ignore
|
||||
|
@ -145,6 +142,7 @@ api_routes: list[Route] = [
|
|||
Route(f'{API_BASE}/components/<int:component_id>/users/<int:user_id>',
|
||||
component_users.ComponentUsersAPI),
|
||||
|
||||
Route(f'{API_BASE}/external_reviews/<string:review_group>', external_reviews_api.ExternalReviewsAPI),
|
||||
Route(f'{API_BASE}/spec_mentors', spec_mentors_api.SpecMentorsAPI),
|
||||
Route(f'{API_BASE}/feature-latency', feature_latency_api.FeatureLatencyAPI),
|
||||
Route(f'{API_BASE}/review-latency', review_latency_api.ReviewLatencyAPI),
|
||||
|
@ -221,6 +219,8 @@ spa_page_routes = [
|
|||
Route('/metrics/feature/popularity'),
|
||||
Route('/metrics/feature/timeline/popularity'),
|
||||
Route('/metrics/feature/timeline/popularity/<int:bucket_id>'),
|
||||
Route('/reports/external_reviews'),
|
||||
Route('/reports/external_reviews/<reviewer>'),
|
||||
Route('/reports/spec_mentors'),
|
||||
Route('/reports/feature-latency'),
|
||||
Route('/reports/review-latency'),
|
||||
|
|
199
openapi/api.yaml
|
@ -13,7 +13,7 @@ info:
|
|||
name: Apache-2.0
|
||||
url: 'https://www.apache.org/licenses/LICENSE-2.0.html'
|
||||
servers:
|
||||
- url: /api/v0
|
||||
- url: /api/v0
|
||||
paths:
|
||||
/componentsusers:
|
||||
get:
|
||||
|
@ -95,6 +95,35 @@ paths:
|
|||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/ReviewLatency'
|
||||
/external_reviews/{review_group}:
|
||||
get:
|
||||
summary: List features whose external reviews are incomplete
|
||||
operationId: listExternalReviews
|
||||
parameters:
|
||||
- in: path
|
||||
name: review_group
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
enum:
|
||||
- tag
|
||||
- gecko
|
||||
- webkit
|
||||
description: >
|
||||
Which review group to focus on:
|
||||
* `tag` - The W3C TAG
|
||||
* `gecko` - The rendering engine that powers Mozilla Firefox
|
||||
* `webkit` - The rendering engine that powers Apple Safari
|
||||
responses:
|
||||
'200':
|
||||
description: >-
|
||||
List of all the outstanding reviews, ordered by urgency.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ExternalReviewsResponse'
|
||||
'404':
|
||||
description: The review group wasn't recognized.
|
||||
/spec_mentors:
|
||||
get:
|
||||
summary: List spec mentors and their activity
|
||||
|
@ -266,6 +295,55 @@ components:
|
|||
- shipped_milestone
|
||||
- shipped_date
|
||||
- owner_emails
|
||||
ExternalReviewsResponse:
|
||||
type: object
|
||||
required:
|
||||
- reviews
|
||||
- link_previews
|
||||
properties:
|
||||
reviews:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/OutstandingReview'
|
||||
link_previews:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/LinkPreview'
|
||||
OutstandingReview:
|
||||
type: object
|
||||
required:
|
||||
- review_link
|
||||
- feature
|
||||
- current_stage
|
||||
properties:
|
||||
review_link:
|
||||
type: string
|
||||
format: url
|
||||
feature:
|
||||
$ref: '#/components/schemas/FeatureLink'
|
||||
current_stage:
|
||||
type: string
|
||||
enum:
|
||||
- incubating
|
||||
- prototyping
|
||||
- dev-trial
|
||||
- wide-review
|
||||
- origin-trial
|
||||
- shipping
|
||||
- shipped
|
||||
description: >
|
||||
The development stage that the feature has reached:
|
||||
- [`incubating`](https://www.chromium.org/blink/launching-features/#start-incubating)
|
||||
- [`prototyping`](https://www.chromium.org/blink/launching-features/#prototyping)
|
||||
- [`dev-trial`](https://www.chromium.org/blink/launching-features/#dev-trials)
|
||||
- [`wide-review`](https://www.chromium.org/blink/launching-features/#widen-review)
|
||||
- [`origin-trial`](https://www.chromium.org/blink/launching-features/#origin-trials)
|
||||
- [`shipping`](https://www.chromium.org/blink/launching-features/#new-feature-prepare-to-ship)
|
||||
- `shipped` - The feature is enabled by default in Chromium.
|
||||
estimated_start_milestone:
|
||||
type: integer
|
||||
estimated_end_milestone:
|
||||
type: integer
|
||||
FeatureLink:
|
||||
type: object
|
||||
required:
|
||||
|
@ -278,3 +356,122 @@ components:
|
|||
name:
|
||||
type: string
|
||||
example: WebGPU
|
||||
LinkPreviewBase:
|
||||
type: object
|
||||
required:
|
||||
- url
|
||||
- type
|
||||
- information
|
||||
- http_error_code
|
||||
properties:
|
||||
url:
|
||||
type: string
|
||||
format: url
|
||||
type:
|
||||
type: string
|
||||
information:
|
||||
type: object
|
||||
http_error_code:
|
||||
type: integer
|
||||
LinkPreview:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/LinkPreviewBase'
|
||||
- discriminator:
|
||||
propertyName: type
|
||||
mapping:
|
||||
github_issue: LinkPreviewGithubIssue
|
||||
github_markdown: LinkPreviewGithubMarkdown
|
||||
github_pull_request: LinkPreviewGithubPullRequest
|
||||
mdn_docs: LinkPreviewMdnDocs
|
||||
google_docs: LinkPreviewGoogleDocs
|
||||
mozilla_bug: LinkPreviewMozillaBug
|
||||
webkit_bug: LinkPreviewWebkitBug
|
||||
specs: LinkPreviewSpecs
|
||||
LinkPreviewGithubIssue:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/LinkPreviewBase'
|
||||
- type: object
|
||||
required: [information]
|
||||
properties:
|
||||
information:
|
||||
type: object
|
||||
properties:
|
||||
url:
|
||||
type: string
|
||||
format: url
|
||||
number:
|
||||
type: integer
|
||||
title:
|
||||
type: string
|
||||
user_login:
|
||||
type: string
|
||||
state:
|
||||
type: string
|
||||
enum:
|
||||
- open
|
||||
- closed
|
||||
state_reason:
|
||||
type: string
|
||||
enum:
|
||||
- completed
|
||||
- reopened
|
||||
- not_planned
|
||||
assignee_login:
|
||||
type: string
|
||||
created_at:
|
||||
type: string
|
||||
format: date
|
||||
updated_at:
|
||||
type: string
|
||||
format: date
|
||||
closed_at:
|
||||
type: string
|
||||
format: date
|
||||
labels:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
LinkPreviewGithubPullRequest:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/LinkPreviewGithubIssue'
|
||||
LinkPreviewGithubMarkdown:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/LinkPreviewBase'
|
||||
- type: object
|
||||
required: [information]
|
||||
properties:
|
||||
information:
|
||||
type: object
|
||||
properties:
|
||||
_parsed_title:
|
||||
type: string
|
||||
content:
|
||||
type: string
|
||||
LinkPreviewOpenGraph:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/LinkPreviewBase'
|
||||
- type: object
|
||||
required: [information]
|
||||
properties:
|
||||
information:
|
||||
type: object
|
||||
properties:
|
||||
title:
|
||||
type: string
|
||||
description:
|
||||
type: string
|
||||
LinkPreviewMdnDocs:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/LinkPreviewOpenGraph'
|
||||
LinkPreviewGoogleDocs:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/LinkPreviewOpenGraph'
|
||||
LinkPreviewMozillaBug:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/LinkPreviewOpenGraph'
|
||||
LinkPreviewWebkitBug:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/LinkPreviewOpenGraph'
|
||||
LinkPreviewSpecs:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/LinkPreviewOpenGraph'
|
||||
|
|
До Ширина: | Высота: | Размер: 92 KiB После Ширина: | Высота: | Размер: 95 KiB |
До Ширина: | Высота: | Размер: 102 KiB После Ширина: | Высота: | Размер: 104 KiB |
До Ширина: | Высота: | Размер: 118 KiB После Ширина: | Высота: | Размер: 120 KiB |
До Ширина: | Высота: | Размер: 122 KiB После Ширина: | Высота: | Размер: 124 KiB |
До Ширина: | Высота: | Размер: 86 KiB После Ширина: | Высота: | Размер: 89 KiB |
До Ширина: | Высота: | Размер: 93 KiB После Ширина: | Высота: | Размер: 95 KiB |
До Ширина: | Высота: | Размер: 143 KiB После Ширина: | Высота: | Размер: 145 KiB |
До Ширина: | Высота: | Размер: 144 KiB После Ширина: | Высота: | Размер: 145 KiB |
До Ширина: | Высота: | Размер: 124 KiB После Ширина: | Высота: | Размер: 126 KiB |
До Ширина: | Высота: | Размер: 125 KiB После Ширина: | Высота: | Размер: 127 KiB |
До Ширина: | Высота: | Размер: 134 KiB После Ширина: | Высота: | Размер: 136 KiB |
До Ширина: | Высота: | Размер: 141 KiB После Ширина: | Высота: | Размер: 142 KiB |
|
@ -0,0 +1,160 @@
|
|||
// @ts-check
|
||||
import {expect, test} from '@playwright/test';
|
||||
import {captureConsoleMessages} from './test_utils';
|
||||
|
||||
import external_reviews_api_result from './external_reviews_api_result.json';
|
||||
|
||||
test.beforeEach(async ({page}, testInfo) => {
|
||||
captureConsoleMessages(page);
|
||||
});
|
||||
|
||||
/**
|
||||
* @param {import('@playwright/test').Page} page
|
||||
* @param {string} heading
|
||||
* @returns {import('@playwright/test').Locator}
|
||||
*/
|
||||
function section(page, heading) {
|
||||
return page
|
||||
.locator('chromedash-report-external-reviews-page section')
|
||||
.filter({has: page.getByRole('heading', {name: heading})});
|
||||
}
|
||||
|
||||
test('external reviewers report renders', async ({page}) => {
|
||||
await page.route('/api/v0/external_reviews/gecko', route =>
|
||||
route.fulfill({
|
||||
status: 200,
|
||||
body: `)]}'\n${JSON.stringify(external_reviews_api_result)}`,
|
||||
})
|
||||
);
|
||||
|
||||
await page.goto('/reports/external_reviews/gecko');
|
||||
|
||||
// Check that the right subset of sections is present, in the right order.
|
||||
await expect
|
||||
.soft(page.getByRole('heading', {level: 2}))
|
||||
.toHaveText(['In Origin Trial', 'Prototyping', 'Already shipped']);
|
||||
|
||||
// Features in origin trial.
|
||||
await expect(
|
||||
section(page, 'In Origin Trial').getByRole('row'),
|
||||
'1 feature'
|
||||
).toHaveCount(2);
|
||||
await expect
|
||||
.soft(
|
||||
section(page, 'In Origin Trial').getByRole('row').nth(1).getByRole('cell')
|
||||
)
|
||||
.toHaveText([
|
||||
/Feature 7 shares a review with Feature 5/,
|
||||
/#5 A Title/,
|
||||
/M100–M104/,
|
||||
]);
|
||||
await expect
|
||||
.soft(
|
||||
section(page, 'In Origin Trial')
|
||||
.getByRole('row')
|
||||
.nth(1)
|
||||
.getByRole('link', {name: 'Feature 7 shares a review with Feature 5'})
|
||||
)
|
||||
.toHaveAttribute('href', '/feature/1001');
|
||||
await expect
|
||||
.soft(
|
||||
section(page, 'In Origin Trial')
|
||||
.getByRole('row')
|
||||
.nth(1)
|
||||
.getByRole('link', {name: /#5 A Title/i})
|
||||
)
|
||||
.toHaveAttribute(
|
||||
'href',
|
||||
'https://github.com/mozilla/standards-positions/issues/5'
|
||||
);
|
||||
|
||||
// Features in prototyping.
|
||||
await expect(
|
||||
section(page, 'Prototyping').getByRole('row'),
|
||||
'3 features'
|
||||
).toHaveCount(4);
|
||||
await expect
|
||||
.soft(section(page, 'Prototyping').getByRole('row'))
|
||||
.toHaveText([/Feature/, /Feature 3/, /Feature 5/, /Feature 4/]); // In this order.
|
||||
await expect
|
||||
.soft(
|
||||
section(page, 'Prototyping')
|
||||
.getByRole('row')
|
||||
.filter({hasText: 'Feature 3'})
|
||||
)
|
||||
.toContainText('M101–M103');
|
||||
|
||||
// Features that already shipped.
|
||||
await expect(
|
||||
section(page, 'Already shipped').getByRole('row'),
|
||||
'1 feature'
|
||||
).toHaveCount(2);
|
||||
await expect
|
||||
.soft(section(page, 'Already shipped').getByRole('row').nth(1))
|
||||
.toContainText('Feature 2');
|
||||
});
|
||||
|
||||
test('sorts features by target milestone', async ({page}) => {
|
||||
function feature(id, start, end) {
|
||||
return {
|
||||
current_stage: 'incubating',
|
||||
estimated_start_milestone: start,
|
||||
estimated_end_milestone: end,
|
||||
feature: {
|
||||
id,
|
||||
name: `Feature ${id}`,
|
||||
},
|
||||
review_link: `https://github.com/w3ctag/design-reviews/issues/${id}`,
|
||||
};
|
||||
}
|
||||
await page.route('/api/v0/external_reviews/tag', route =>
|
||||
route.fulfill({
|
||||
status: 200,
|
||||
body: `)]}'\n${JSON.stringify({
|
||||
reviews: [
|
||||
feature(1, null, null),
|
||||
feature(0, null, null),
|
||||
feature(2, 100, null),
|
||||
feature(3, 101, null),
|
||||
feature(4, null, 109),
|
||||
feature(5, null, 102),
|
||||
feature(6, 104, 107),
|
||||
feature(7, 103, 108),
|
||||
feature(8, 105, 106),
|
||||
],
|
||||
link_previews: [1, 2, 3, 4, 5].map(id => ({
|
||||
information: {
|
||||
created_at: '2024-04-15T08:30:42',
|
||||
labels: [],
|
||||
number: id,
|
||||
state: 'open',
|
||||
title: 'A Title',
|
||||
updated_at: '2024-04-15T10:30:43',
|
||||
url: `https://api.github.com/mozilla/standards-positions/issues/${id}`,
|
||||
},
|
||||
type: 'github_issue',
|
||||
url: `https://github.com/mozilla/standards-positions/issues/${id}`,
|
||||
})),
|
||||
})}`,
|
||||
})
|
||||
);
|
||||
|
||||
await page.goto('/reports/external_reviews/tag');
|
||||
|
||||
await expect.soft(section(page, 'Incubating').getByRole('row')).toHaveText([
|
||||
// Header row
|
||||
/Feature/,
|
||||
// Sort first by end milestone.
|
||||
/Feature 5/,
|
||||
/Feature 8/,
|
||||
/Feature 6/,
|
||||
/Feature 7/,
|
||||
/Feature 4/,
|
||||
// Then by start milestone.
|
||||
/Feature 2/,
|
||||
/Feature 3/,
|
||||
// Then list features without any milestones, in order of review link.
|
||||
/Feature 0/,
|
||||
/Feature 1/,
|
||||
]);
|
||||
});
|
|
@ -0,0 +1,116 @@
|
|||
{
|
||||
"reviews": [
|
||||
{
|
||||
"current_stage": "origin-trial",
|
||||
"estimated_end_milestone": 104,
|
||||
"estimated_start_milestone": 100,
|
||||
"feature": {
|
||||
"id": 1001,
|
||||
"name": "Feature 7 shares a review with Feature 5"
|
||||
},
|
||||
"review_link": "https://github.com/mozilla/standards-positions/issues/5"
|
||||
},
|
||||
{
|
||||
"current_stage": "prototyping",
|
||||
"estimated_end_milestone": 103,
|
||||
"estimated_start_milestone": 101,
|
||||
"feature": {"id": 1002, "name": "Feature 3"},
|
||||
"review_link": "https://github.com/mozilla/standards-positions/issues/3"
|
||||
},
|
||||
{
|
||||
"current_stage": "prototyping",
|
||||
"estimated_end_milestone": 104,
|
||||
"estimated_start_milestone": 100,
|
||||
"feature": {"id": 1003, "name": "Feature 5"},
|
||||
"review_link": "https://github.com/mozilla/standards-positions/issues/5"
|
||||
},
|
||||
{
|
||||
"current_stage": "prototyping",
|
||||
"estimated_end_milestone": null,
|
||||
"estimated_start_milestone": null,
|
||||
"feature": {"id": 1004, "name": "Feature 4"},
|
||||
"review_link": "https://github.com/mozilla/standards-positions/issues/4"
|
||||
},
|
||||
{
|
||||
"current_stage": "shipped",
|
||||
"estimated_end_milestone": null,
|
||||
"estimated_start_milestone": null,
|
||||
"feature": {"id": 1005, "name": "Feature 2"},
|
||||
"review_link": "https://github.com/mozilla/standards-positions/issues/2"
|
||||
}
|
||||
],
|
||||
"link_previews": [
|
||||
{
|
||||
"http_error_code": null,
|
||||
"information": {
|
||||
"assignee_login": null,
|
||||
"closed_at": null,
|
||||
"created_at": "2024-04-15T08:30:42",
|
||||
"labels": [],
|
||||
"number": 2,
|
||||
"state": "open",
|
||||
"state_reason": null,
|
||||
"title": "A Title",
|
||||
"updated_at": "2024-04-15T10:30:43",
|
||||
"url": "https://api.github.com/mozilla/standards-positions/issues/2",
|
||||
"user_login": null
|
||||
},
|
||||
"type": "github_issue",
|
||||
"url": "https://github.com/mozilla/standards-positions/issues/2"
|
||||
},
|
||||
{
|
||||
"http_error_code": null,
|
||||
"information": {
|
||||
"assignee_login": null,
|
||||
"closed_at": null,
|
||||
"created_at": "2024-04-15T08:30:42",
|
||||
"labels": [],
|
||||
"number": 3,
|
||||
"state": "open",
|
||||
"state_reason": null,
|
||||
"title": "A Title",
|
||||
"updated_at": "2024-04-15T10:30:43",
|
||||
"url": "https://api.github.com/mozilla/standards-positions/issues/3",
|
||||
"user_login": null
|
||||
},
|
||||
"type": "github_issue",
|
||||
"url": "https://github.com/mozilla/standards-positions/issues/3"
|
||||
},
|
||||
{
|
||||
"http_error_code": null,
|
||||
"information": {
|
||||
"assignee_login": null,
|
||||
"closed_at": null,
|
||||
"created_at": "2024-04-15T08:30:42",
|
||||
"labels": [],
|
||||
"number": 4,
|
||||
"state": "open",
|
||||
"state_reason": null,
|
||||
"title": "A Title",
|
||||
"updated_at": "2024-04-15T10:30:43",
|
||||
"url": "https://api.github.com/mozilla/standards-positions/issues/4",
|
||||
"user_login": null
|
||||
},
|
||||
"type": "github_issue",
|
||||
"url": "https://github.com/mozilla/standards-positions/issues/4"
|
||||
},
|
||||
{
|
||||
"http_error_code": null,
|
||||
"information": {
|
||||
"assignee_login": null,
|
||||
"closed_at": null,
|
||||
"created_at": "2024-04-15T08:30:42",
|
||||
"labels": [],
|
||||
"number": 5,
|
||||
"state": "open",
|
||||
"state_reason": null,
|
||||
"title": "A Title",
|
||||
"updated_at": "2024-04-15T10:30:43",
|
||||
"url": "https://api.github.com/mozilla/standards-positions/issues/5",
|
||||
"user_login": null
|
||||
},
|
||||
"type": "github_issue",
|
||||
"url": "https://github.com/mozilla/standards-positions/issues/5"
|
||||
}
|
||||
]
|
||||
}
|