Skip to content

Bump version and relocate notify API, add tests#102

Merged
goldlabelapps merged 2 commits intomasterfrom
staging
Apr 28, 2026
Merged

Bump version and relocate notify API, add tests#102
goldlabelapps merged 2 commits intomasterfrom
staging

Conversation

@goldlabelapps
Copy link
Copy Markdown
Owner

Bump package version to 3.0.5 and refactor notify utilities into app/api/notify (renamed files and updated imports). Update API routes to import the relocated resend router. Replace/modify Postman collection (tests/Postman.json) with renamed endpoints, method/body adjustments and added requests. Add new tests/test_github.py with unit tests for /github and related admin endpoints using TestClient and mocked DB connections.

Bump package version to 3.0.5 and refactor notify utilities into app/api/notify (renamed files and updated imports). Update API routes to import the relocated resend router. Replace/modify Postman collection (tests/Postman.json) with renamed endpoints, method/body adjustments and added requests. Add new tests/test_github.py with unit tests for /github and related admin endpoints using TestClient and mocked DB connections.
Introduce a Goldlabel-branded HTML email template and apply it to resend emails. Adds app/utils/email_templates with goldlabel.py (goldlabel_email) and __init__.py export, and updates app/api/notify/resend.py to wrap outgoing HTML with the goldlabel_email template before sending, ensuring consistent branded emails.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR bumps the app version to 3.0.5, relocates the Resend/notify implementation under app/api/notify, adds a Goldlabel-branded HTML email wrapper, refreshes the Postman collection, and introduces GitHub API endpoint tests.

Changes:

  • Update routing/imports to use the relocated app/api/notify Resend router.
  • Add Goldlabel email template utilities and wrap outgoing Resend HTML with branding.
  • Add tests/test_github.py and update tests/Postman.json with renamed/new requests.

Reviewed changes

Copilot reviewed 7 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/test_github.py Adds unit tests for /github and GitHub admin endpoints using TestClient + mocked DB.
tests/Postman.json Updates/renames endpoints and adds GitHub requests to the collection.
app/utils/email_templates/goldlabel.py Introduces a Goldlabel-branded HTML email wrapper template.
app/utils/email_templates/init.py Exposes goldlabel_email from the templates package.
app/api/routes.py Updates Resend router import path after notify relocation.
app/api/notify/send_email.py Adds Resend email sending utility under the new notify package.
app/api/notify/resend.py Updates imports and wraps sent HTML via goldlabel_email(...).
app/api/notify/init.py Adds notify package initializer and exports a router symbol.
app/init.py Bumps package version to 3.0.5.
Comments suppressed due to low confidence (1)

tests/Postman.json:719

  • In the Postman collection, the "Create Tables" request points to /github/createtable, but the API route is /api/github/createtable (see app/api/github/sql/create_tables.py). As-is, this request will 404; update the URL/path in the collection to include the /api prefix.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/test_github.py
Comment on lines +64 to +65
def test_github_get_returns_all_tables(monkeypatch):
# One COUNT fetchone per table, one fetchall of rows per table.
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tests are written as pytest-style functions using the monkeypatch fixture, but the repo’s CI runs python -m unittest discover -s tests, which won’t execute them. Either convert these to unittest.TestCase tests (no pytest fixtures), or update the CI test command to run pytest so these tests actually run in PR validation.

Copilot uses AI. Check for mistakes.
Comment thread tests/test_github.py
@@ -0,0 +1,149 @@
from unittest.mock import MagicMock, patch
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MagicMock/patch are imported but not used in this test module. Removing unused imports helps keep the test code clean and avoids failures if a linter is introduced later.

Suggested change
from unittest.mock import MagicMock, patch

Copilot uses AI. Check for mistakes.
@goldlabelapps goldlabelapps merged commit 27b630d into master Apr 28, 2026
5 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Python Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants