Import from GitHubMarkdown

Import from GitHub

Load one preset from a public GitHub JSON file pinned to a full commit SHA.

Presets and the preset editor have an Import from GitHub action for workspace owners and admins. Both read one public JSON file.

  • From Presets, import opens the create dialog for a new preset. Importing is not publishing: review the policy, then run the required live test before Create and publish v1 can succeed.
  • From the editor, import replaces the current draft content but keeps the preset name, description, and active version. If the tab has unsaved changes, confirm Replace draft first. Run a test, then Publish vN.

URL shape

Use a public GitHub file URL pinned to a full 40-character commit SHA:

https://github.com/owner/repo/blob/<40-character-commit-sha>/presets/support.json

A branch name, tag, short SHA, private repository, or directory URL is rejected. Each import reads exactly one file. There is no repository checkout, code execution, bulk discovery, or automatic sync.

File format

The file wraps the preset identity and its dashboard content:

{
  "slug": "support-forum",
  "content": {
    "name": "Support forum",
    "description": "Moderation rules for support forum replies.",
    "defaultLevel": "standard",
    "categories": [
      {
        "id": "harassment",
        "name": "Harassment",
        "description": "Targeted abuse or repeated personal insults.",
        "enabled": true,
        "flag": 0.45,
        "block": 0.85,
        "severity": 7,
        "allowExamples": ["I don't think this answer addresses the question."],
        "blockExamples": []
      }
    ]
  }
}

Download the tested example: preset.example.json.

slug becomes the suggested preset ID. You can change it in the create dialog before the preset exists. Category IDs must be unique within the file and follow the same lowercase, dash-separated format as the editor.

Before publication

The imported policy still needs a completed real-inference test at its default level, just like a preset created from scratch. The create dialog includes Test the imported policy for that reason. A degraded fallback or a test of different content does not count. Without evidence for the exact policy, creation fails with test_required. See Preset editor.

The version summary can include the source link. That summary is editable text, not an authoritative provenance record. Flagline does not track later commits or remove a preset when the upstream file changes or disappears.