Skip to content

Commit

Permalink
Merge branch 'main' into humitos/remove-append-conf-mkdocs
Browse files Browse the repository at this point in the history
  • Loading branch information
humitos authored Mar 19, 2024
2 parents 8d78e5c + 32b734e commit 8440aab
Show file tree
Hide file tree
Showing 62 changed files with 10,449 additions and 8,032 deletions.
38 changes: 38 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,41 @@
Version 10.23.0
---------------

:Date: March 19, 2024

* `@github-actions[bot] <https://github.com/github-actions[bot]>`__: Dependencies: all packages updated via pip-tools (`#11224 <https://github.com/readthedocs/readthedocs.org/pull/11224>`__)
* `@agjohnson <https://github.com/agjohnson>`__: Fix bugs with support form (`#11222 <https://github.com/readthedocs/readthedocs.org/pull/11222>`__)
* `@zliang-akamai <https://github.com/zliang-akamai>`__: Fix Read the Docs config file name in notifications (`#11221 <https://github.com/readthedocs/readthedocs.org/pull/11221>`__)
* `@humitos <https://github.com/humitos>`__: Build: always reset the build before building (`#11213 <https://github.com/readthedocs/readthedocs.org/pull/11213>`__)
* `@humitos <https://github.com/humitos>`__: Release 10.22.0 (`#11211 <https://github.com/readthedocs/readthedocs.org/pull/11211>`__)
* `@agjohnson <https://github.com/agjohnson>`__: Add build detail view beta notification (`#11208 <https://github.com/readthedocs/readthedocs.org/pull/11208>`__)
* `@humitos <https://github.com/humitos>`__: Addons: allow users to define `root_selector` from the WebUI (`#11181 <https://github.com/readthedocs/readthedocs.org/pull/11181>`__)
* `@humitos <https://github.com/humitos>`__: Addons: sorting algorithm for versions customizable on flyout (`#11069 <https://github.com/readthedocs/readthedocs.org/pull/11069>`__)

Version 10.22.0
---------------

:Date: March 12, 2024

* `@agjohnson <https://github.com/agjohnson>`__: Add build detail view beta notification (`#11208 <https://github.com/readthedocs/readthedocs.org/pull/11208>`__)
* `@github-actions[bot] <https://github.com/github-actions[bot]>`__: Dependencies: all packages updated via pip-tools (`#11203 <https://github.com/readthedocs/readthedocs.org/pull/11203>`__)
* `@humitos <https://github.com/humitos>`__: Revert "Notifications: show "Maxium concurrency limit reached" as `WARNING`" (`#11202 <https://github.com/readthedocs/readthedocs.org/pull/11202>`__)
* `@humitos <https://github.com/humitos>`__: Notifications: de-duplicate them when using APIv2 from builders (`#11197 <https://github.com/readthedocs/readthedocs.org/pull/11197>`__)
* `@humitos <https://github.com/humitos>`__: Notifications: show "Maxium concurrency limit reached" as `WARNING` (`#11196 <https://github.com/readthedocs/readthedocs.org/pull/11196>`__)
* `@agjohnson <https://github.com/agjohnson>`__: Allow setting Allauth provider secrets from host system (`#11194 <https://github.com/readthedocs/readthedocs.org/pull/11194>`__)
* `@humitos <https://github.com/humitos>`__: Support: create a form to render it nicely in ext-theme (`#11193 <https://github.com/readthedocs/readthedocs.org/pull/11193>`__)
* `@stsewd <https://github.com/stsewd>`__: Docs: Update Google SSO docs (`#11191 <https://github.com/readthedocs/readthedocs.org/pull/11191>`__)
* `@humitos <https://github.com/humitos>`__: Notification: fix `choices` rendering for `INVALID_CHOICE` (`#11190 <https://github.com/readthedocs/readthedocs.org/pull/11190>`__)
* `@ericholscher <https://github.com/ericholscher>`__: Release 10.21.0 (`#11185 <https://github.com/readthedocs/readthedocs.org/pull/11185>`__)
* `@stsewd <https://github.com/stsewd>`__: Project: force PR previews to match repo only if the repo is public (`#11184 <https://github.com/readthedocs/readthedocs.org/pull/11184>`__)
* `@humitos <https://github.com/humitos>`__: Addons: allow users to define `root_selector` from the WebUI (`#11181 <https://github.com/readthedocs/readthedocs.org/pull/11181>`__)
* `@ericholscher <https://github.com/ericholscher>`__: Init path to ensure it exists (`#11178 <https://github.com/readthedocs/readthedocs.org/pull/11178>`__)
* `@stsewd <https://github.com/stsewd>`__: Project: build both default and latest version when saving the project form (`#11177 <https://github.com/readthedocs/readthedocs.org/pull/11177>`__)
* `@humitos <https://github.com/humitos>`__: Build: show the YAML config file before validating it (`#11175 <https://github.com/readthedocs/readthedocs.org/pull/11175>`__)
* `@stsewd <https://github.com/stsewd>`__: Allow override SOCIALACCOUNT_PROVIDERS from ops (`#11165 <https://github.com/readthedocs/readthedocs.org/pull/11165>`__)
* `@humitos <https://github.com/humitos>`__: Lint: run `black` against all our Python files (`#11145 <https://github.com/readthedocs/readthedocs.org/pull/11145>`__)
* `@humitos <https://github.com/humitos>`__: Addons: sorting algorithm for versions customizable on flyout (`#11069 <https://github.com/readthedocs/readthedocs.org/pull/11069>`__)

Version 10.21.0
---------------

Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@

master_doc = "index"
copyright = "Read the Docs, Inc & contributors"
version = "10.21.0"
version = "10.23.0"
release = version
exclude_patterns = ["_build", "shared", "_includes"]
default_role = "obj"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "readthedocs",
"version": "10.21.0",
"version": "10.23.0",
"description": "Read the Docs build dependencies",
"author": "Read the Docs, Inc <[email protected]>",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion readthedocs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Read the Docs."""


__version__ = "10.21.0"
__version__ = "10.23.0"
5 changes: 5 additions & 0 deletions readthedocs/api/v2/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,3 +427,8 @@ class NotificationSerializer(serializers.ModelSerializer):
class Meta:
model = Notification
exclude = ["attached_to_id", "attached_to_content_type"]

def create(self, validated_data):
# Override this method to allow de-duplication of notifications,
# by calling our custom ``.add()`` method that does this.
return Notification.objects.add(**validated_data)
22 changes: 21 additions & 1 deletion readthedocs/builds/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,28 @@ def get_context_data(self, **kwargs):
context["project"] = self.project

build = self.get_object()
context["notifications"] = build.notifications.all()

# Temporary notification to point to the same page on the new dashboard
#
# To support readthedocs.com, we have to point to the login view. We
# can't point directly to the build view on the new dashboard as this
# will give the users a 404 because they aren't logged in.
#
# On community, we _don't want this_ as this requires the user to have
# a login to view the new dashboard.
url_domain = settings.PRODUCTION_DOMAIN
if url_domain.startswith("beta."):
url_domain = url_domain[5:]
else:
url_domain = f"beta.{url_domain}"
url_build = build.get_absolute_url()
# Point to the login view with the build as ?next. We are expecting
# users to have accounts to view this.
if settings.RTD_ALLOW_ORGANIZATIONS:
url_build = reverse("account_login") + f"?next={url_build}"
context["url_switch_dashboard"] = f"https://{url_domain}{url_build}"

context["notifications"] = build.notifications.all()
if not build.notifications.filter(
message_id=BuildAppError.GENERIC_WITH_BUILD_ID
).exists():
Expand Down
2 changes: 1 addition & 1 deletion readthedocs/config/notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
body=_(
textwrap.dedent(
"""
The required <code>readthedocs.yaml</code> configuration file was not found at repository's root.
The required <code>.readthedocs.yaml</code> configuration file was not found at repository's root.
Learn how to use this file in our <a href="https://docs.readthedocs.io/en/stable/config-file/index.html">configuration file tutorial</a>.
"""
).strip(),
Expand Down
4 changes: 3 additions & 1 deletion readthedocs/core/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,18 +189,20 @@ def valid_value(self, value):
class SupportForm(forms.Form):
name = forms.CharField()
email = forms.EmailField()
explanation = forms.CharField(
body = forms.CharField(
label=_("Explanation of the issue"),
help_text=_("Please provide as much detail as possible."),
widget=forms.Textarea,
)
url = forms.URLField(
label=_("URL"),
help_text=_("Is there a specific page this happened?"),
required=False,
)
attachment = forms.FileField(
label=_("Screenshot or additional file"),
help_text=_("Anything else that would help us solve this issue?"),
required=False,
)
severity_level = forms.ChoiceField(
choices=(
Expand Down
Loading

0 comments on commit 8440aab

Please sign in to comment.