INNER CODE UNIT · TypeScript

IGNORED

open-gitagent/clawless · src/container.ts:553

    const IGNORED = /^(node_modules\/|\.git\/|\.env$)/;
    const allPaths = await this.listWorkspaceFiles();
    const files: GitFile[] = [];

    for (const relPath of allPaths) {
      if (relPath.endsWith('/')) continue; // skip directories
      if (IGNORED.test(relPath)) continue;
      try {
        const content = await this.wc.fs.readFile(`workspace/${relPath}`, 'utf-8');
        files.push({ path: relPath, content });
      } catch { /* skip unreadable */ }
    }

    const commitMsg = message ?? `Sync from ClawLess at ${new Date().toISOString()}`;
    const sha = await this.gitService.pushChanges(files, commitMsg);

    this.audit?.log('git.push', `Pushed ${files.length} files to ${owner}/${repo}`, {
      owner, repo, sha, fileCount: files.length,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…