diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 041d76c..c380177 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install Hatch run: | - python -m pip install hatch==1.15.0 + python -m pip install hatch==1.16.5 - uses: webfactory/ssh-agent@v0.9.1 with: ssh-private-key: ${{ secrets.SDK_KEY }} diff --git a/.github/workflows/notify_slack.yml b/.github/workflows/notify_slack.yml new file mode 100644 index 0000000..c1b2ebb --- /dev/null +++ b/.github/workflows/notify_slack.yml @@ -0,0 +1,39 @@ +name: Slack Notifications + +on: + issues: + types: [opened, reopened, edited] + pull_request_target: + types: [opened, reopened, synchronize] + +permissions: {} + +jobs: + notify: + runs-on: ubuntu-latest + steps: + - name: Send issue notification to Slack + if: github.event_name == 'issues' + uses: slackapi/slack-github-action@v2.1.1 + with: + webhook: ${{ secrets.SLACK_WEBHOOK_URL_ISSUE }} + webhook-type: incoming-webhook + payload: | + { + "action": "${{ github.event.action }}", + "issue_url": "${{ github.event.issue.html_url }}", + "package_name": "${{ github.repository }}" + } + + - name: Send pull request notification to Slack + if: github.event_name == 'pull_request_target' + uses: slackapi/slack-github-action@v2.1.1 + with: + webhook: ${{ secrets.SLACK_WEBHOOK_URL_PR }} + webhook-type: incoming-webhook + payload: | + { + "action": "${{ github.event.action }}", + "pr_url": "${{ github.event.pull_request.html_url }}", + "package_name": "${{ github.repository }}" + } \ No newline at end of file diff --git a/tests/web/handlers_test.py b/tests/web/handlers_test.py index d08932b..3cb84a8 100644 --- a/tests/web/handlers_test.py +++ b/tests/web/handlers_test.py @@ -2381,9 +2381,9 @@ def test_handler_naming_matches_smithy_operations(): for handler_name in handler_names: assert hasattr(handlers, handler_name), f"Handler {handler_name} not found" handler_class = getattr(handlers, handler_name) - assert issubclass( - handler_class, EndpointHandler - ), f"{handler_name} should inherit from EndpointHandler" + assert issubclass(handler_class, EndpointHandler), ( + f"{handler_name} should inherit from EndpointHandler" + ) def test_all_handlers_have_executor(): @@ -2408,9 +2408,9 @@ def test_all_handlers_have_executor(): for handler_class in handlers_to_test: handler = handler_class(executor) - assert ( - handler.executor == executor - ), f"{handler_class.__name__} should store executor reference" + assert handler.executor == executor, ( + f"{handler_class.__name__} should store executor reference" + ) class MockExceptionHandler(EndpointHandler): diff --git a/tests/web/routes_test.py b/tests/web/routes_test.py index 176a8a9..a7793d3 100644 --- a/tests/web/routes_test.py +++ b/tests/web/routes_test.py @@ -919,9 +919,9 @@ def test_router_constructor_with_all_default_route_types(): for path, method, expected_type in test_cases: route = router.find_route(path, method) - assert isinstance( - route, expected_type - ), f"Expected {expected_type.__name__} for {method} {path}" + assert isinstance(route, expected_type), ( + f"Expected {expected_type.__name__} for {method} {path}" + ) def test_router_constructor_with_subset_of_route_types():