@openagt/skill-github 0.0.1 → 0.1.0
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.
- package/SKILL.md +4 -4
- package/dist/cli.d.ts +2 -2
- package/dist/cli.js +2 -2
- package/dist/home.d.ts +2 -2
- package/dist/home.d.ts.map +1 -1
- package/dist/home.js +2 -2
- package/dist/home.js.map +1 -1
- package/dist/open.d.ts +2 -2
- package/dist/requests.d.ts +1 -1
- package/package.json +5 -5
package/SKILL.md
CHANGED
|
@@ -9,14 +9,14 @@ The project's pull requests and issues are on GitHub. This skill is how you reac
|
|
|
9
9
|
|
|
10
10
|
## The command
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
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.
|
|
13
13
|
|
|
14
14
|
## Your pull request
|
|
15
15
|
|
|
16
16
|
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:
|
|
17
17
|
|
|
18
18
|
```
|
|
19
|
-
npx github open --title "<one line naming what the change does>" --body "<what changed, and why>"
|
|
19
|
+
npx @openagt/skill-github@0.1 open --title "<one line naming what the change does>" --body "<what changed, and why>"
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
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.
|
|
@@ -26,7 +26,7 @@ A pull request whose body has a line `Closes #<number>` closes that issue when i
|
|
|
26
26
|
## Reading pull requests and issues
|
|
27
27
|
|
|
28
28
|
```
|
|
29
|
-
npx github requests [--branch <b>] [--state open|merged|all] [--since <iso>]
|
|
29
|
+
npx @openagt/skill-github@0.1 requests [--branch <b>] [--state open|merged|all] [--since <iso>]
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
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).
|
|
@@ -36,7 +36,7 @@ For a pull request's discussion and diff, and for the project's issues, use `gh`
|
|
|
36
36
|
## Landing a pull request for a person
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npx github merge <number>
|
|
39
|
+
npx @openagt/skill-github@0.1 merge <number>
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
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/dist/cli.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { type GitRunner } from '@openagt/agent-data';
|
|
|
2
2
|
import { type GhRunner } from './gh.js';
|
|
3
3
|
/**
|
|
4
4
|
* The command line over the package (#1820): the same functions for an agent in a shell, and for
|
|
5
|
-
*
|
|
6
|
-
* declared in package.json as `"
|
|
5
|
+
* OpenAgent and the scheduler, which run this command as the project's git host provider,
|
|
6
|
+
* declared in package.json as `"openagent": { "git-host": "github" }`. One implementation, every
|
|
7
7
|
* surface a caller.
|
|
8
8
|
*
|
|
9
9
|
* The contract, the same as the other skills' commands: JSON on stdout, one line for a person on
|
package/dist/cli.js
CHANGED
|
@@ -9,8 +9,8 @@ import { GIT_HOST_NAME, homeUrlFor } from './home.js';
|
|
|
9
9
|
import { createRepository, offerRepository } from './create.js';
|
|
10
10
|
/**
|
|
11
11
|
* The command line over the package (#1820): the same functions for an agent in a shell, and for
|
|
12
|
-
*
|
|
13
|
-
* declared in package.json as `"
|
|
12
|
+
* OpenAgent and the scheduler, which run this command as the project's git host provider,
|
|
13
|
+
* declared in package.json as `"openagent": { "git-host": "github" }`. One implementation, every
|
|
14
14
|
* surface a caller.
|
|
15
15
|
*
|
|
16
16
|
* The contract, the same as the other skills' commands: JSON on stdout, one line for a person on
|
package/dist/home.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type GitRunner } from '@openagt/agent-data';
|
|
2
2
|
/**
|
|
3
3
|
* The project's page on GitHub (#489, #1820): derived from the `origin` remote, so the dashboard's
|
|
4
|
-
* project bar can link straight to it.
|
|
4
|
+
* project bar can link straight to it. OpenAgent asks this command and never spells the host.
|
|
5
5
|
*/
|
|
6
|
-
/** The git host's name, as
|
|
6
|
+
/** The git host's name, as OpenAgent labels the link. */
|
|
7
7
|
export declare const GIT_HOST_NAME = "GitHub";
|
|
8
8
|
/**
|
|
9
9
|
* Normalize a git remote URL to an `https://github.com/<owner>/<repo>` URL, or undefined when
|
package/dist/home.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"home.d.ts","sourceRoot":"","sources":["../src/home.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAEnE;;;GAGG;AAEH,
|
|
1
|
+
{"version":3,"file":"home.d.ts","sourceRoot":"","sources":["../src/home.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAEnE;;;GAGG;AAEH,yDAAyD;AACzD,eAAO,MAAM,aAAa,WAAW,CAAA;AAErC;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAWpE;AAED,6FAA6F;AAC7F,wBAAsB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,GAAE,SAA2B,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAM3G"}
|
package/dist/home.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { nodeGitRunner } from '@openagt/agent-data';
|
|
2
2
|
/**
|
|
3
3
|
* The project's page on GitHub (#489, #1820): derived from the `origin` remote, so the dashboard's
|
|
4
|
-
* project bar can link straight to it.
|
|
4
|
+
* project bar can link straight to it. OpenAgent asks this command and never spells the host.
|
|
5
5
|
*/
|
|
6
|
-
/** The git host's name, as
|
|
6
|
+
/** The git host's name, as OpenAgent labels the link. */
|
|
7
7
|
export const GIT_HOST_NAME = 'GitHub';
|
|
8
8
|
/**
|
|
9
9
|
* Normalize a git remote URL to an `https://github.com/<owner>/<repo>` URL, or undefined when
|
package/dist/home.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"home.js","sourceRoot":"","sources":["../src/home.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAkB,MAAM,qBAAqB,CAAA;AAEnE;;;GAGG;AAEH,
|
|
1
|
+
{"version":3,"file":"home.js","sourceRoot":"","sources":["../src/home.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAkB,MAAM,qBAAqB,CAAA;AAEnE;;;GAGG;AAEH,yDAAyD;AACzD,MAAM,CAAC,MAAM,aAAa,GAAG,QAAQ,CAAA;AAErC;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAc;IAC9C,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,EAAE,CAAA;IACzB,MAAM,KAAK,GACT,GAAG,CAAC,KAAK,CAAC,yBAAyB,CAAC;QACpC,GAAG,CAAC,KAAK,CAAC,kCAAkC,CAAC;QAC7C,GAAG,CAAC,KAAK,CAAC,6CAA6C,CAAC,CAAA;IAC1D,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QAAE,OAAO,SAAS,CAAA;IACzC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;IAC9D,+EAA+E;IAC/E,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC;QAAE,OAAO,SAAS,CAAA;IAClD,OAAO,sBAAsB,IAAI,EAAE,CAAA;AACrC,CAAC;AAED,6FAA6F;AAC7F,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,GAAW,EAAE,GAAG,GAAc,aAAa,EAAE;IAC5E,IAAI,CAAC;QACH,OAAO,iBAAiB,CAAC,MAAM,GAAG,CAAC,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,GAAG,CAAC,CAAC,CAAA;IAC3E,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAA;IAClB,CAAC;AACH,CAAC"}
|
package/dist/open.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { type GitRunner } from '@openagt/agent-data';
|
|
|
2
2
|
import { type GhRunner } from './gh.js';
|
|
3
3
|
import { type MergeArming, type WatchStarter } from './merge.js';
|
|
4
4
|
/**
|
|
5
|
-
* Opening a pull request (#1820): the agent's own step after its branch is pushed, and
|
|
6
|
-
*
|
|
5
|
+
* Opening a pull request (#1820): the agent's own step after its branch is pushed, and
|
|
6
|
+
* OpenAgent's on a person's Open PR. The words are the caller's; a branch that already has an
|
|
7
7
|
* open request gets no second one, and only the merge arming happens. Pushing is not here: the
|
|
8
8
|
* branches package pushes, this package asks GitHub.
|
|
9
9
|
*/
|
package/dist/requests.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type GhRunner } from './gh.js';
|
|
2
2
|
/**
|
|
3
3
|
* The project's pull requests, as one read (#1820): the ones of a branch, the open ones, the ones
|
|
4
|
-
* merged since a time. One shape for every caller,
|
|
4
|
+
* merged since a time. One shape for every caller, OpenAgent's reads and the scheduler's
|
|
5
5
|
* record alike, so nothing outside this package knows how GitHub spells a state.
|
|
6
6
|
*/
|
|
7
7
|
/** One pull request, as the command prints it. */
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openagt/skill-github",
|
|
3
|
-
"version": "0.0
|
|
4
|
-
"description": "GitHub as a skill for coding agents: the project's pull requests and issues through gh, and the one command
|
|
3
|
+
"version": "0.1.0",
|
|
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.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
|
-
"url": "git+https://github.com/
|
|
8
|
+
"url": "git+https://github.com/openagt/openagent.git",
|
|
9
9
|
"directory": "packages/skill-github"
|
|
10
10
|
},
|
|
11
11
|
"type": "module",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"bin": {
|
|
24
24
|
"github": "bin/github"
|
|
25
25
|
},
|
|
26
|
-
"
|
|
26
|
+
"openagent": {
|
|
27
27
|
"git-host": "github",
|
|
28
28
|
"repository": "github"
|
|
29
29
|
},
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"./SKILL.md": "./SKILL.md"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@openagt/agent-data": "0.0.
|
|
39
|
+
"@openagt/agent-data": "0.0.3"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/node": "^20.0.0",
|