diff --git a/README.md b/README.md index 661e653..df5b37b 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ Available endpoints: * Requires valid branch reference in payload * Requires auth token * Protected by distributed locking - * Example payload: `{"ref": "refs/heads/views"}` + * Example payload: `{"ref": "refs/heads/main"}` * `GET /cacheHash.json` * Returns current git hash of the data store @@ -58,7 +58,7 @@ Available endpoints: * `npm install -g markdownlint-cli2` * A virtual environment * Install requirements.txt inside the virtual environment -* The `addon-datastore` repository checked out locally to a views branch. +* The `addonstore-views` repository checked out locally. ### Testing Local Changes @@ -80,7 +80,7 @@ From the virtual environment ```sh FLASK_APP=app PYTHONPATH=./src TEMP=/tmp/ \ -dataViewsFolder=../../addon-datastore branchRef=views \ +dataViewsFolder=../../addon-datastore branchRef=main \ COPYRIGHT_YEARS=2026 LOG_LEVEL=DEBUG \ flask run ``` @@ -91,9 +91,9 @@ Required environment variables: * `PYTHONPATH`: path to `src` * `TEMP`: path to an existing folder to create temporary locks -* `dataViewsFolder`: path to where your repository of `addon-datastore` is checked out locally -* `branchRef`: Git branch to track for `addon-datastore` - * views-staging/views +* `dataViewsFolder`: path to where your repository of `addonstore-views` is checked out locally +* `branchRef`: Git branch to track for `addonstore-views` + * Default is `refs/heads/main` * `COPYRIGHT_YEARS`: String of years displayed on web front-end for add-on store * e.g. 2025-2026 @@ -117,5 +117,5 @@ Test the following scenarios: * Invalid NVDA API version should return appropriate error 3. Update Endpoint: - * Valid branch update (e.g., `{"ref": "refs/heads/views"}`) + * Valid branch update (e.g., `{"ref": "refs/heads/main"}`) * Invalid branch reference should be rejected diff --git a/src/addonStoreApi/transformedSubmissions.py b/src/addonStoreApi/transformedSubmissions.py index deaa8d4..128c362 100644 --- a/src/addonStoreApi/transformedSubmissions.py +++ b/src/addonStoreApi/transformedSubmissions.py @@ -57,7 +57,7 @@ def getAvailableParsedApiVersions(self) -> list["MajorMinorPatch"]: @DataFolder.accessForReading def _jsonBasedGetAvailableApiVersions(self) -> list[str]: """Return API versions listed in the nvdaAPIVersions.json file contained in the transformed submission store: - https://github.com/nvaccess/addon-datastore/blob/views/nvdaAPIVersions.json + https://github.com/nvaccess/addonstore-views/blob/main/nvdaAPIVersions.json JSON example: [ { @@ -134,7 +134,7 @@ def getLatestStableRelease(self) -> "MajorMinorPatch": @DataFolder.accessForReading def getRichApiVersions(self) -> list[dict[str, str]]: """Return API versions listed in the nvdaAPIVersions.json file contained in the transformed submission store: - https://github.com/nvaccess/addon-datastore/blob/views/nvdaAPIVersions.json + https://github.com/nvaccess/addonstore-views/blob/main/nvdaAPIVersions.json JSON example: [ { diff --git a/src/app.py b/src/app.py index f3bd08f..8fec493 100644 --- a/src/app.py +++ b/src/app.py @@ -452,7 +452,7 @@ def verify_github_signature(payload_body, signature_header): @app.route("/update", methods=["POST"]) def update(): - """GitHub webhook endpoint for updating the addon-datastore.""" + """GitHub webhook endpoint for updating addonstore-views.""" # Verify webhook signature signature_header = request.headers.get("X-Hub-Signature-256") if not verify_github_signature(request.get_data(), signature_header): @@ -484,7 +484,7 @@ def update(): return Response("Branch reference missing", status=HTTPStatus.BAD_REQUEST) # Get the configured branch from environment - configured_branch = os.getenv("branchRef", "refs/heads/views-staging") + configured_branch = os.getenv("branchRef", "refs/heads/main") if request.json["ref"] != configured_branch: log.info( f"Skipping update for non-target branch: got {request.json['ref']}, configured for {configured_branch}",