You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🚧 Synchronize GitHub Repository Files with Portal (Optional: Permissions)
🧾 User Story
As a portal user and data steward, I want to synchronize files and metadata from a GitHub repository (including Git LFS files) into the portal whenever a designated branch is updated, And optionally synchronize user permissions based on GitHub repository roles, So that file visibility and access control in the portal align with the source of truth in GitHub.
✅ Acceptance Criteria
🔁 File Sync
When a designated branch (e.g., main or release) is updated, the portal:
Pulls the latest Git LFS pointers.
Extracts associated metadata (e.g., from .lfs-meta/*.json).
Displays files and metadata in the portal’s UI.
Git LFS files are registered in the portal (e.g., as DocumentReference or file entries).
File paths and metadata remain accurate and up to date.
🟡 Optional: Permission Sync
If enabled, the portal synchronizes user access permissions with GitHub:
Users with write or admin access to the GitHub repo are granted edit/upload permissions in the portal.
Users with read access are granted view-only permissions.
Permission sync occurs on a scheduled basis or on demand.
Changes to GitHub team or collaborator roles are reflected within a configurable SLA (e.g., ≤1 hour).
🏗️ Technical Design
📁 GitHub Repository File Sync
Trigger:
GitHub webhook on push to a specific branch, or scheduled polling (e.g., cron job)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
🚧 Synchronize GitHub Repository Files with Portal (Optional: Permissions)
🧾 User Story
As a portal user and data steward,
I want to synchronize files and metadata from a GitHub repository (including Git LFS files) into the portal whenever a designated branch is updated,
And optionally synchronize user permissions based on GitHub repository roles,
So that file visibility and access control in the portal align with the source of truth in GitHub.
✅ Acceptance Criteria
🔁 File Sync
When a designated branch (e.g.,
mainorrelease) is updated, the portal:.lfs-meta/*.json).Git LFS files are registered in the portal (e.g., as
DocumentReferenceor file entries).File paths and metadata remain accurate and up to date.
🟡 Optional: Permission Sync
If enabled, the portal synchronizes user access permissions with GitHub:
writeoradminaccess to the GitHub repo are granted edit/upload permissions in the portal.readaccess are granted view-only permissions.Permission sync occurs on a scheduled basis or on demand.
Changes to GitHub team or collaborator roles are reflected within a configurable SLA (e.g., ≤1 hour).
🏗️ Technical Design
📁 GitHub Repository File Sync
Trigger:
pushto a specific branch, or scheduled polling (e.g., cron job)Steps:
Clone the repository and pull Git LFS files:
Create Gen3 Project if it doesn't exist
Detect Git LFS pointer files:
Load
.lfs-meta/*.jsonfiles (if present) to extract metadata:{ "drs_id": "drs:ohsu.org/abc123", "patient": "patient:OH123", "specimen": "specimen:SP456" }Register or update:
DocumentReferenceusingcreate_object_id(path, project_id)Patient,Specimen) from META/🟡 Optional: GitHub Permissions Sync
Trigger:
Steps:
Query repository collaborators:
Map permissions:
adminorwrite→ portal edit accessread→ portal view-only accessUpdate portal IAM or Arborist policies accordingly
🔄 Optional: Webhook Handler or GitHub Action
🪝 Webhook Handler Script
pushevents🛠️ GitHub Action Example
📦 Integration Summary
📝 Tasks
All reactions