@craftsamo/github-tools 0.5.0 → 0.6.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@craftsamo/github-tools",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "GitHub tools for coding agents: issues, project boards, pull requests, repositories, releases and Actions.",
5
5
  "author": "craftsamo",
6
6
  "license": "MIT",
package/plugin.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
3
3
  "name": "github-tools",
4
- "version": "0.5.0",
4
+ "version": "0.6.0",
5
5
  "description": "GitHub tools for coding agents: issues, project boards, pull requests, repositories, releases and Actions.",
6
6
  "author": {
7
7
  "name": "craftsamo",
package/plugin.yaml CHANGED
@@ -1,5 +1,5 @@
1
1
  name: github-tools
2
- version: 0.5.0
2
+ version: 0.6.0
3
3
  description: "GitHub tools for coding agents: issues, project boards, pull requests, repositories, releases and Actions."
4
4
  manifest_version: 1
5
5
  requires_hermes: ">=0.22"
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: github-issues
3
- description: "Use when reading or changing GitHub issues through the github_issue_* tools: view or list issues, search a repository's issues, create, edit, comment on, close or reopen an issue, set its kind (an Issue Type or a type: label), labels, assignees or milestone, relate issues (parent, sub-issues, blocked by, blocking), or link a development branch to an issue. Covers issue references, what each tool reports, partial failures and error codes. Not for pull requests, project boards, or how to plan work."
3
+ description: "Use when reading or changing GitHub issues through the github_issue_* tools: view or list issues, search a repository's issues, create, edit, comment on, close or reopen an issue, set its kind (an Issue Type or a type: label), labels, assignees, milestone or organization issue fields (Priority, Effort, Start date, Target date), put a new issue on a board, relate issues (parent, sub-issues, blocked by, blocking), or link a development branch to an issue. Covers issue references, what each tool reports, partial failures and error codes. Not for pull requests, managing project boards and their items, or how to plan work."
4
4
  ---
5
5
 
6
6
  # GitHub issues
@@ -9,16 +9,16 @@ Eight tools work on GitHub issues. Some hosts show a tool under a longer name
9
9
  (a server or plugin prefix before it); the part ending in `github_issue_…` is
10
10
  the tool meant here.
11
11
 
12
- | Tool | Does | Writes |
13
- | ---------------------- | ---------------------------------------------------------- | ---------------------------- |
14
- | `github_issue_read` | `method: "view"` one issue in full, `"list"` many | no |
15
- | `github_issue_create` | a new issue with its kind, labels, milestone and relations | adds |
16
- | `github_issue_edit` | title, body, kind, labels, assignees, milestone | overwrites |
17
- | `github_issue_comment` | a comment | adds |
18
- | `github_issue_close` | closes with a reason | overwrites |
19
- | `github_issue_reopen` | reopens | overwrites |
20
- | `github_issue_relate` | parent, sub-issues, blocked by, blocking | changes only what differs |
21
- | `github_issue_develop` | a branch on GitHub linked to the issue | creates once, then reuses it |
12
+ | Tool | Does | Writes |
13
+ | ---------------------- | ------------------------------------------------------------------------------- | ---------------------------- |
14
+ | `github_issue_read` | `method: "view"` one issue in full, `"list"` many | no |
15
+ | `github_issue_create` | a new issue with its kind, labels, milestone, relations, issue fields and board | adds |
16
+ | `github_issue_edit` | title, body, kind, labels, assignees, milestone, issue fields | overwrites |
17
+ | `github_issue_comment` | a comment | adds |
18
+ | `github_issue_close` | closes with a reason | overwrites |
19
+ | `github_issue_reopen` | reopens | overwrites |
20
+ | `github_issue_relate` | parent, sub-issues, blocked by, blocking | changes only what differs |
21
+ | `github_issue_develop` | a branch on GitHub linked to the issue | creates once, then reuses it |
22
22
 
23
23
  A write usually waits for the host's approval, and a comment, a close, a
24
24
  reopen or a new assignee notifies people. Read before you write when the
@@ -40,7 +40,7 @@ An issue is `12`, `#12`, `owner/repo#12` or its URL.
40
40
  ## Reading
41
41
 
42
42
  - **`view`** returns the issue with its body, kind, labels, assignees,
43
- milestone, parent, sub-issues and their progress, blocked-by and blocking,
43
+ milestone, issue fields, parent, sub-issues and their progress, blocked-by and blocking,
44
44
  linked branches, closing pull requests, boards and the latest `comments`
45
45
  (default 5, at most 50; `comment_count` is the total).
46
46
  `dependencies_error` set means blocked-by and blocking could not be read
@@ -49,7 +49,10 @@ An issue is `12`, `#12`, `owner/repo#12` or its URL.
49
49
  `milestone` (`"none"` for none), `label`, `assignee` (`"@me"`, `"none"`) and
50
50
  extra search words in `query` (`sort:updated-desc`, `in:title crash`). It
51
51
  never reaches another repository: `repo:`, `org:` and `user:` are refused
52
- in `query`; list each repository in its own call.
52
+ in `query`; list each repository in its own call. `field.<name>:<value>` in
53
+ `query` filters by an issue field (`field.priority:high`,
54
+ `field."target date":>=2026-12-01`), and each row carries its
55
+ `issue_fields`.
53
56
  - **`list` with `parent`** returns that issue's sub-issues instead, filtered
54
57
  by `state`; the search filters cannot be combined with it.
55
58
  - `truncated: true` means more matched than `limit` (default 30, at most
@@ -69,19 +72,45 @@ repository lacks it. The result's `kind.via` says which (`type` or `label`).
69
72
  On an edit, a label kind replaces the issue's other `type:` labels. `list`
70
73
  with `kind` matches the same way.
71
74
 
75
+ ## Issue fields
76
+
77
+ Issue fields (Priority, Effort, Start date, Target date, and any others) are
78
+ defined by the organization, so only its repositories have them; a personal
79
+ account's repository refuses them. A read reports them as `issue_fields`, the
80
+ fields that have a value by name (`{}` when none is set, `null` on a GitHub
81
+ that has no issue fields).
82
+
83
+ - `issue_fields` on create and edit takes `{"Priority": "High", "Target date":
84
+ "2026-12-01"}`: a text, a number, a date as `YYYY-MM-DD`, an option name, or
85
+ a list of option names for a multi-select field. Names and options match
86
+ without regard to case.
87
+ - `clear_issue_fields` on edit takes the names to clear.
88
+ - Every name, option and value is checked before anything is written; a
89
+ refusal lists the fields or options there are. Read an issue with `view`
90
+ to see which fields its organization uses before guessing a name.
91
+ - They are the issue's own fields, not a board's: on a board, set the board's
92
+ fields (Status, Start, Target, …) with `fields`.
93
+
72
94
  ## Creating
73
95
 
74
96
  `github_issue_create` settles the issue's place in the same call: `kind`,
75
- `labels` (they must exist), `assignees`, `milestone`, `parent` and
76
- `blocked_by`.
77
-
78
- - A `milestone` that does not exist fails before anything is written, unless
79
- `create_milestone: true`.
80
- - Kind, parent and blocked-by are set after the issue exists. If one of them
81
- fails, the call still succeeds: the issue is returned and the failed steps
82
- are listed in `errors`. **Do not create the issue again.** Fix the failed
83
- step on the issue that exists, with `github_issue_edit` (kind) or
84
- `github_issue_relate` (parent, blocked by).
97
+ `labels` (they must exist), `assignees`, `milestone`, `parent`,
98
+ `blocked_by`, `issue_fields`, and a board with `project` and its `fields`.
99
+
100
+ - Everything that can fail is checked before the issue is made: a
101
+ `milestone` that does not exist (unless `create_milestone: true`), an issue
102
+ field, option or value, and the board and its values.
103
+ - `project` is found as the board tools find one (a number, `owner/number`,
104
+ its URL or title, default `Roadmap`). The issue starts as Todo there, or
105
+ Waiting when an issue in `blocked_by` is open and the board has Waiting; a
106
+ `Status` in `fields` replaces that.
107
+ - Kind, parent, blocked-by, issue fields and the board are set after the
108
+ issue exists. If one of them fails, the call still succeeds: the issue is
109
+ returned and the failed steps are listed in `errors` (`kind`, `parent`,
110
+ `blocked_by`, `issue_fields`, `project`, `fields.<Name>`). **Do not create
111
+ the issue again.** Fix the failed step on the issue that exists, with
112
+ `github_issue_edit` (kind, issue fields), `github_issue_relate` (parent,
113
+ blocked by) or the board tools (board, board fields).
85
114
 
86
115
  ## Editing
87
116
 
@@ -91,6 +120,10 @@ with `kind` matches the same way.
91
120
  - Labels and assignees are added or removed by list (`add_labels`,
92
121
  `remove_assignees`, …); nothing else on the issue changes.
93
122
  - `milestone` sets one, `remove_milestone: true` takes the issue out of it.
123
+ - `issue_fields` sets and `clear_issue_fields` clears issue fields; the
124
+ result's `issue_fields` is what the issue holds afterwards. They are written
125
+ after the other changes: if that write fails, the message names the changes
126
+ already applied, so fix the cause and call again with the issue fields only.
94
127
  - `changed` lists what the call applied. A call with nothing to change is an
95
128
  error, not a no-op.
96
129
 
@@ -97,7 +97,9 @@ user does it in the web UI.
97
97
  An item is an issue, a pull request or a draft on a board.
98
98
 
99
99
  - **`item_add`** puts an issue or pull request on the board, or returns its
100
- item when it is there already (`created: false`, archived ones too).
100
+ item when it is there already (`created: false`, archived ones too). A new
101
+ issue or pull request goes on a board in the call that makes it:
102
+ `github_issue_create` and `github_pr_create` take `project` and `fields`.
101
103
  - **`item_create`** makes a draft: a title and body that live only on the
102
104
  board. **`item_convert`** turns it into an issue of `repo`, keeping its field
103
105
  values, and sets kind, labels and milestone as `github_issue_create` does.