@openagt/skill-github 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/SKILL.md +51 -0
  2. package/package.json +3 -3
package/SKILL.md ADDED
@@ -0,0 +1,51 @@
1
+ ---
2
+ name: github
3
+ description: "The project's git host is GitHub: how to open your pull request when you are asked to, how to land it, and how to read and close the project's issues."
4
+ package: "@openagt/skill-github@0.1"
5
+ ---
6
+
7
+ # GitHub
8
+
9
+ The project's pull requests and issues are on GitHub. This skill is how you reach them.
10
+
11
+ ## The command
12
+
13
+ Run the `github` command inside your checkout, always by its full name: `npx @openagt/skill-github@0.1`. It prints JSON; a refusal exits 1 with a line on stderr; a wrong command line exits 2 with the usage.
14
+
15
+ ## Your pull request
16
+
17
+ Open a pull request only when your task or the person asks for one, or asks you to publish your work. Push your branch first (your branches skill says how), then:
18
+
19
+ ```
20
+ npx @openagt/skill-github@0.1 open --title "<one line naming what the change does>" --body "<what changed, and why>"
21
+ ```
22
+
23
+ It opens the pull request for the branch you are on and prints it in `request` (`number`, `url`). A branch that already has an open pull request gets no second one: that one is answered, with `existing` true. Add `--merge` when the work may land on its own: the pull request then merges once its checks pass, also where the repository does not allow auto-merge (`merge` in the answer says `auto-armed`, `merged` or `watching`). Add `--draft` instead for a pull request a person should look at first; with `--merge` too, `--draft` is dropped.
24
+
25
+ A pull request whose body has a line `Closes #<number>` closes that issue when it merges.
26
+
27
+ ## Commenting on an issue or a pull request
28
+
29
+ ```
30
+ npx @openagt/skill-github@0.1 comment <number> --body "<text>"
31
+ ```
32
+
33
+ It posts a new comment, opened with what you run on, so what you post is told apart from what people write. Always comment this way, never with `gh`.
34
+
35
+ ## Reading pull requests and issues
36
+
37
+ ```
38
+ npx @openagt/skill-github@0.1 requests [--branch <b>] [--state open|merged|all] [--since <iso>]
39
+ ```
40
+
41
+ The project's newest 50 pull requests, newest first, all states unless `--state`, only `<b>`'s with `--branch`; `--since` keeps those created since, or merged since with `--state merged`. Each has `number`, `url`, `state` (`open`, `merged`, `closed`), `title`, `draft`, `branch`, `head`, `createdAt`, and for a merged one `mergedAt` and `mergeCommit` (the commit it landed as).
42
+
43
+ For a pull request's discussion and diff, and for the project's issues, use `gh` directly: `gh pr view <number> --comments`, `gh pr diff <number>`, `gh issue list`, `gh issue view <number> --comments`. `gh` is installed and logged in where you run.
44
+
45
+ ## Landing a pull request for a person
46
+
47
+ ```
48
+ npx @openagt/skill-github@0.1 merge <number>
49
+ ```
50
+
51
+ A draft is marked ready, then the merge is armed as `--merge` arms it: `outcome` says `auto-armed`, `merged` or `watching`; a request no longer open is refused as `not-open`. Only when whoever started you asked you to land it.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openagt/skill-github",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "GitHub as a skill for coding agents: the project's pull requests and issues through gh, and the one command OpenAgent and the scheduler run for the git host: requests, open, merge, home, and replies, what came on the pull requests this machine's agents opened since each ended.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -37,8 +37,8 @@
37
37
  "./SKILL.md": "./SKILL.md"
38
38
  },
39
39
  "dependencies": {
40
- "@openagt/agent-data": "0.0.8",
41
- "@openagt/skill-logs": "0.1.4"
40
+ "@openagt/skill-logs": "0.1.5",
41
+ "@openagt/agent-data": "0.0.9"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@types/node": "^20.0.0",