Template Preview for {obj.name}
+Object Content Type: {obj.object_content_type}
+Notification Intervals: {', '.join(obj.notification_interval_choices)}
+Subject:
+{obj.subject}
+ +diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml index 2f103f53b79..33942968529 100644 --- a/.github/workflows/test-build.yml +++ b/.github/workflows/test-build.yml @@ -201,3 +201,31 @@ jobs: - name: Upload report if: (github.event_name != 'pull_request') && (success() || failure()) # run this step even if previous step failed uses: ./.github/actions/gen-report + + scripts: + runs-on: ubuntu-22.04 + permissions: + checks: write + needs: build-cache + services: + postgres: + image: postgres + + env: + POSTGRES_PASSWORD: ${{ env.OSF_DB_PASSWORD }} + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + ports: + # Maps tcp port 5432 on service container to the host + - 5432:5432 + steps: + - uses: actions/checkout@v2 + - uses: ./.github/actions/start-build + - name: Run tests + run: poetry run python3 -m invoke test-ci-scripts -n 1 --junit + - name: Upload report + if: (github.event_name != 'pull_request') && (success() || failure()) # run this step even if previous step failed + uses: ./.github/actions/gen-report diff --git a/addons/base/views.py b/addons/base/views.py index 16633ddbbfd..3e42eb79450 100644 --- a/addons/base/views.py +++ b/addons/base/views.py @@ -34,7 +34,6 @@ from framework.flask import redirect from framework.sentry import log_exception from framework.transactions.handlers import no_auto_transaction -from website import mails from website import settings from addons.base import signals as file_signals from addons.base.utils import format_last_known_metadata, get_mfr_url @@ -52,7 +51,7 @@ DraftRegistration, Guid, FileVersionUserMetadata, - FileVersion + FileVersion, NotificationType ) from osf.metrics import PreprintView, PreprintDownload from osf.utils import permissions @@ -64,7 +63,7 @@ from website.util import rubeus # import so that associated listener is instantiated and gets emails -from website.notifications.events.files import FileEvent # noqa +from notifications.file_event_notifications import FileEvent # noqa ERROR_MESSAGES = {'FILE_GONE': """ + ''' + f''' +
+Object Content Type: {obj.object_content_type}
+Notification Intervals: {', '.join(obj.notification_interval_choices)}
+{obj.subject}
+ +