Skip to content

Comments

Add Git repository integration for static site export#128

Draft
Copilot wants to merge 4 commits intomainfrom
copilot/add-export-settings-feature
Draft

Add Git repository integration for static site export#128
Copilot wants to merge 4 commits intomainfrom
copilot/add-export-settings-feature

Conversation

Copy link
Contributor

Copilot AI commented Feb 14, 2026

Extends the static site export feature with persistent Git repository publishing. After generating a static site snapshot, the system can automatically commit, push, and optionally create a pull request to a configured GitHub or GitLab repository.

Changes

Database & Persistence

  • New git_publish_settings table stores repository URL, branch configuration, credentials, and PR templates
  • GitPublishSettingsRepository for CRUD operations
  • Settings persist across sessions and apply to all future static site generations

Git Operations

  • GitPublishCommand handles complete workflow: clone → extract static site → commit → push → create PR
  • Supports GitHub and GitLab APIs for automated PR/MR creation
  • Uses Git credential helper to avoid exposing tokens in URLs or logs
  • Template substitution in commit messages and PR titles (e.g., ${timestamp})

UI Integration

  • Static site modal extended with collapsible Git configuration form
  • Toggle to enable/disable publishing per generation
  • REST endpoints in StaticSiteEndpoint for loading/saving Git settings

Automation

  • MakeStaticSiteJob checks for enabled Git settings after site generation
  • If configured, automatically publishes to repository without user intervention

Security

Credentials are passed via Git credential helper rather than URL embedding:

// Before: https://token@github.com/user/repo.git
// After: Git credential store with temporary .git-credentials file
configureCredentialHelper(settings, workDir);

Access token validation only required when creating new settings or explicitly updating the token field.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • www.puppycrawl.com
    • Triggering command: /opt/hostedtoolcache/CodeQL/2.24.1/x64/codeql/tools/linux64/java/bin/java /opt/hostedtoolcache/CodeQL/2.24.1/x64/codeql/tools/linux64/java/bin/java -jar /opt/hostedtoolcache/CodeQL/2.24.1/x64/codeql/xml/tools/xml-extractor.jar --fileList=/home/REDACTED/work/cms-platform/.codeql-scratch/dbs/java/working/files-to-index9087151866149303156.list --sourceArchiveDir=/home/REDACTED/work/cms-platform/.codeql-scratch/dbs/java/src --outputDir=/home/REDACTED/work/cms-platform/.codeql-scratch/dbs/java/trap/java (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

There is a feature to Export the website as a static archive from the Visual Page Editor... add a feature so that the exported website can optionally save settings to the database and access a Git repo to commit the current state of the website via a branch and create a PR. The feature will remember the settings and allow future publishing to the git repo.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits February 14, 2026 21:48
- Create database schema for git_publish_settings table
- Add GitPublishSettings domain model and repository
- Implement LoadGitPublishSettingsCommand and SaveGitPublishSettingsCommand
- Create GitPublishCommand for Git operations (clone, commit, push, PR creation)
- Update StaticSiteEndpoint with Git settings endpoints
- Update MakeStaticSiteJob to auto-publish to Git after generation
- Add Git configuration UI to static-site-modal.jsp
- Update static-site-manager.js to handle Git settings
- Support for GitHub and GitLab providers

Co-authored-by: rajkowski <10373492+rajkowski@users.noreply.github.com>
Co-authored-by: rajkowski <10373492+rajkowski@users.noreply.github.com>
- Use Git credential helper instead of embedding tokens in URLs
- Avoid exposing access tokens in logs or error messages
- Only require access token validation for new settings
- Allow updating settings without re-entering token

Co-authored-by: rajkowski <10373492+rajkowski@users.noreply.github.com>
Copilot AI changed the title [WIP] Add export feature for saving settings and Git integration Add Git repository integration for static site export Feb 14, 2026
Copilot AI requested a review from rajkowski February 14, 2026 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants