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
Copy file name to clipboardExpand all lines: prompts/examples/git.md
+15-8Lines changed: 15 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,27 +33,34 @@ tools:
33
33
command:
34
34
- --no-pager
35
35
- "{{args|into}}"
36
-
host-dir: /Users/slim/repo/bobloblaw
36
+
- name: gh
37
+
container:
38
+
env:
39
+
GITHUB_TOKEN: "{{pat}}"
40
+
workdir: /thread/docker-test
37
41
---
38
42
-->
39
43
40
44
# Background
41
45
42
46
This shows how an agent can work with a _private_ git repository.
43
47
44
-
This tests that we can clone and make a change to a private repo. The git container mounts a prepared .ssh directory and .gitconfig file. In order to try this one, you'll need to do 3 things.
48
+
This tests that we can clone and make a change to a private repo. The git container mounts a prepared .ssh directory and .gitconfig file. In order to try this one, you'll need to do 2 things.
45
49
46
-
1. Update the `host-dir` entry in the above comment to point at a empty directory. The agent is going to clone into this directory so start with an empty directory.
47
50
1. Update the two mounts in git tool entry from the comment above. This is how you will provide credential access to the git container (read-only).
48
51
2. Update the prompt in the section below to point at a private repo of your choosing.
49
52
50
53
The next section contains the prompt that will be sent to the agent. This is where the agent instructions begin.
51
54
52
55
# prompt user
53
56
54
-
1. use the git tool to clone [email protected]:slimslenderslacks/bobloblaw.git into the current directory. Do not create a new directory. It's okay if this
55
-
fails because the repository is already cloned.
56
-
2. use the append tool to write me a special message in the README.md file.
57
-
3. use the git tool to commit the changes to the README.md file with the message "thankyou for being you".
58
-
4. use the git tool to push the changes.
57
+
Create a random branch named that starts with the string 'slim/', contains 5 random numbers or letters, and no spaces. I will refer to this as the branch name.
58
+
59
+
* use the git tool to clone [email protected]:slimslenderslacks/bobloblaw.git into the current directory. Do not create a new directory. It's okay if this
60
+
fails because the repository is already cloned.
61
+
* use the git tool to create a branch with the branch name described above.
62
+
* use the append tool to write me a special message in the README.md file.
63
+
* use the git tool to commit the changes to the README.md file with the message "thankyou for being you".
64
+
* use the git tool to push the changes.
65
+
* use the github cli to create a pull request for this branch name with the title "here's my secret message".
0 commit comments