Skip to content

Verify: read-only upstream sync fields when webhook-driven #5

Description

@JohnRDOrazio

Context

Commit 57435cb (with companion backend commit 3800304 on ontokit-api) introduced automatic upstream sync configuration when GitHub webhooks are enabled.

What was added

Backend (ontokit-api 3800304):

  • When webhooks are enabled on a GitHub integration, an UpstreamSyncConfig is automatically created (or updated) with frequency="webhook", using the integration's repo_owner, repo_name, default_branch, and ontology_file_path. This eliminates the need for users to manually fill out the Upstream Source Tracking form with the same information.
  • When webhooks are disabled, the upstream sync frequency is downgraded from "webhook" to "manual" (the config is preserved so the user's update_mode preference is kept).

Frontend (ontokit-web 57435cb):

  • In the configured (non-editing) view: a note reading "Automatically triggered by GitHub webhooks" appears below the frequency label when the config is webhook-driven.
  • In the editing form: the repo owner, repo name, branch, and file path fields become read-only with dimmed styling and a note "Repository fields are managed by the GitHub integration." These values are derived from the GitHub integration and shouldn't be edited independently.
  • The frequency dropdown and update mode remain fully editable.

Test checklist

  • Enable webhooks on a GitHub integration → verify an upstream sync config is auto-created with frequency="webhook"
  • Check the Upstream Source Tracking section shows "Automatically triggered by GitHub webhooks"
  • Click "Edit" on the upstream sync config → verify repo owner, repo name, branch, and file path are read-only with dimmed styling
  • Verify the explanatory note "Repository fields are managed by the GitHub integration" appears in the edit form
  • Verify the frequency dropdown and update mode are still editable
  • Disable webhooks on the integration → verify upstream sync frequency changes to "manual"
  • If an upstream sync config already existed before enabling webhooks, verify it is updated (not duplicated)
  • Create a new integration with webhooks enabled from the start → verify upstream sync config is created on save

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions