MCPcopy Index your code
hub / github.com/dagger/container-use / WriteFileInSourceRepo

Method WriteFileInSourceRepo

environment/integration/helpers.go:341–345  ·  view source on GitHub ↗

WriteFileInSourceRepo writes a file to the source repo and commits it

(path, content, commitMessage string)

Source from the content-addressed store, hash-verified

339
340// WriteFileInSourceRepo writes a file to the source repo and commits it
341func (u *UserActions) WriteFileInSourceRepo(path, content, commitMessage string) {
342 require.NotEmpty(u.t, u.repoDir, "Need direct access for source file manipulation")
343 writeFile(u.t, u.repoDir, path, content)
344 gitCommit(u.t, u.repoDir, commitMessage)
345}
346
347// CreateBranchInSourceRepo creates and checks out a new branch in the source repo
348func (u *UserActions) CreateBranchInSourceRepo(branchName string) {

Callers 1

Calls 2

gitCommitFunction · 0.85
writeFileFunction · 0.70

Tested by 1