fix: harden GitHub App setup, sync user-data.sh, and simplify SKILL.md#1
fix: harden GitHub App setup, sync user-data.sh, and simplify SKILL.md#1proactive-ai-engineer[bot] wants to merge 1 commit intomainfrom
Conversation
…rraform user-data
WalkthroughThis PR refactors the installation and configuration architecture to improve separation of concerns and reduce code duplication. The changes centralize configuration file storage in a dedicated CONFIG_DIR, consolidate git identity setup into a reusable script, and significantly simplify the Terraform bootstrap process by delegating to an upstream installation script. The refactoring introduces GitHub App authentication support through new environment variables and eliminates approximately 40 lines of manual setup code from the user-data script. Overall, these changes establish a single source of truth for installation logic and reduce maintenance overhead. Changes
Sequence DiagramThis diagram shows the interactions between components: sequenceDiagram
participant Script as Installation Script
participant FS as File System
participant Env as Environment Variables
Note over Script: GitHub App Setup Flow
alt USE_GITHUB_APP = "yes"
Script->>FS: mkdir -p $CONFIG_DIR
Note over Script,FS: Changed: Create config directory first
Script->>Script: Set PEM_DEST = $CONFIG_DIR/github-app.pem
Note over Script: Changed: PEM now stored in CONFIG_DIR<br/>instead of INSTALL_DIR
Script->>FS: cp $GITHUB_APP_PEM_PATH to PEM_DEST
Script->>FS: chmod 600 PEM_DEST
Script->>Env: export GITHUB_APP_PEM_PATH = PEM_DEST
Note over Env: Updated path available for<br/>subsequent operations
else GitHub App not used
Note over Script: Skip GitHub App setup
end
🔗 Cross-Repository Impact AnalysisEnable automatic detection of breaking changes across your dependent repositories. → Set up now Learn more about Cross-Repository AnalysisWhat It Does
How to Enable
Benefits
|
What
cat openclaw.json, completely missing GitHub App credentials. It now properly invokes the actualinstall.shand passes the variables down.scripts/refresh-github-token.sh. The script was runningexport GIT_AUTHOR_NAME=...which silently failed because the script is called in a subshell viaexport GH_TOKEN=$(...). It now directly invokesgit config --global user.name/email.git config, I removed the manualgit configsteps fromSKILL.md. This trims token usage and reduces the LLM hallucination/error surface area.Why
This resolves structural bugs in multi-tenant agent setups, fixes Terraform drift preventing GitHub App usage on fresh Ubuntu AMIs, and makes the LLM instructions cleaner and less error-prone.
EntelligenceAI PR Summary
This PR refactors installation architecture to centralize configuration logic and introduce GitHub App authentication support.
Confidence Score: 4/5 - Mostly Safe