@github-tools/sdk 1.5.0 → 1.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/README.md CHANGED
@@ -141,6 +141,31 @@ Supported override properties:
141
141
 
142
142
  Core properties (`execute`, `inputSchema`, `outputSchema`) cannot be overridden.
143
143
 
144
+ ## Commit Attribution
145
+
146
+ Control how commits are attributed when using `createOrUpdateFile` or `mergePullRequest`:
147
+
148
+ ```ts
149
+ import { createGithubTools } from '@github-tools/sdk'
150
+
151
+ const tools = createGithubTools({
152
+ token,
153
+ coAuthors: [
154
+ { name: 'my-bot[bot]', email: '12345+my-bot[bot]@users.noreply.github.com' }
155
+ ]
156
+ })
157
+ ```
158
+
159
+ This appends `Co-authored-by` trailers to commit messages, crediting additional contributors.
160
+
161
+ | Option | Type | Description |
162
+ |--------|------|-------------|
163
+ | `author` | `{ name: string, email: string }` | The person who wrote the code. Falls back to the authenticated user. |
164
+ | `committer` | `{ name: string, email: string }` | The person who applied the commit. Falls back to the authenticated user. |
165
+ | `coAuthors` | `{ name: string, email: string }[]` | Additional contributors added as `Co-authored-by` trailers. |
166
+
167
+ Commits made via the GitHub API are **automatically signed** by GitHub's web-flow key, passing branch protection rules that require signed commits.
168
+
144
169
  ## Tool Selection with toolpick
145
170
 
146
171
  With dozens of tools, context window usage adds up. [toolpick](https://github.com/pontusab/toolpick) selects only the most relevant tools per step so the model sees what it needs:
@@ -411,7 +436,7 @@ async function agentTurn(prompt: string) {
411
436
  }
412
437
  ```
413
438
 
414
- > See [`examples/pr-review-bot`](../../examples/pr-review-bot) for a complete PR review bot built with Chat SDK and Vercel Workflow.
439
+ > See [`examples/pr-review-agent`](../../examples/pr-review-agent) for a complete PR review agent built with Chat SDK and Vercel Workflow.
415
440
 
416
441
  All presets (`code-review`, `issue-triage`, `ci-ops`, `repo-explorer`, `maintainer`) work with `createDurableGithubAgent`. Options mirror `createGithubAgent` with additional pass-through for `DurableAgentOptions` fields like `experimental_telemetry`, `onStepFinish`, `onFinish`, and `prepareStep`.
417
442