Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -93,7 +93,7 @@ Required environment variables:
* `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
* Default is `main`
Comment on lines 93 to +96
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

The docs say the branchRef default is main, but the application default is refs/heads/main (and /update compares against the full ref from GitHub payloads). Please update the docs to reflect the full default value and clarify whether branchRef should be a full ref (refs/heads/<branch>) or a short name—also align the earlier flask run example (branchRef=views) accordingly.

Copilot uses AI. Check for mistakes.
* `COPYRIGHT_YEARS`: String of years displayed on web front-end for add-on store
* e.g. 2025-2026

Expand All @@ -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
2 changes: 1 addition & 1 deletion src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}",
Expand Down
Loading