[{"data":1,"prerenderedAt":852},["ShallowReactive",2],{"navigation_docs":3,"-guide-commit-attribution":66,"-guide-commit-attribution-surround":847},[4,22,54],{"title":5,"path":6,"stem":7,"children":8,"page":21},"Getting Started","\u002Fgetting-started","docs",[9,13,17],{"title":10,"path":11,"stem":12},"Introduction","\u002Fgetting-started\u002Fintroduction","docs\u002F1.getting-started\u002F1.introduction",{"title":14,"path":15,"stem":16},"Installation","\u002Fgetting-started\u002Finstallation","docs\u002F1.getting-started\u002F2.installation",{"title":18,"path":19,"stem":20},"Agent Skills","\u002Fgetting-started\u002Fagent-skills","docs\u002F1.getting-started\u002F3.agent-skills",false,{"title":23,"path":24,"stem":7,"children":25,"page":21},"Guide","\u002Fguide",[26,30,34,38,42,46,50],{"title":27,"path":28,"stem":29},"Quick Start","\u002Fguide\u002Fquick-start","docs\u002F2.guide\u002F1.quick-start",{"title":31,"path":32,"stem":33},"Scope with Presets","\u002Fguide\u002Fpresets","docs\u002F2.guide\u002F2.presets",{"title":35,"path":36,"stem":37},"Control Write Safety","\u002Fguide\u002Fapproval-control","docs\u002F2.guide\u002F3.approval-control",{"title":39,"path":40,"stem":41},"Commit Attribution","\u002Fguide\u002Fcommit-attribution","docs\u002F2.guide\u002F4.commit-attribution",{"title":43,"path":44,"stem":45},"Configure Token Scopes","\u002Fguide\u002Ftoken-permissions","docs\u002F2.guide\u002F5.token-and-permissions",{"title":47,"path":48,"stem":49},"Examples","\u002Fguide\u002Fexamples","docs\u002F2.guide\u002F6.examples",{"title":51,"path":52,"stem":53},"Durable workflows (Vercel Workflow)","\u002Fguide\u002Fdurable-workflows","docs\u002F2.guide\u002F7.durable-workflows",{"title":55,"path":56,"stem":7,"children":57,"page":21},"Api","\u002Fapi",[58,62],{"title":59,"path":60,"stem":61},"Tools Catalog","\u002Fapi\u002Ftools-catalog","docs\u002F3.api\u002F1.tools-catalog",{"title":63,"path":64,"stem":65},"API Reference","\u002Fapi\u002Freference","docs\u002F3.api\u002F2.reference",{"id":67,"title":39,"body":68,"description":835,"extension":836,"links":837,"meta":840,"navigation":237,"path":40,"seo":845,"stem":41,"__hash__":846},"docs\u002Fdocs\u002F2.guide\u002F4.commit-attribution.md",{"type":69,"value":70,"toc":823},"minimark",[71,84,89,106,110,113,184,187,191,194,340,346,366,369,373,376,504,508,512,522,645,649,660,707,710,719,724,727,738,742,798,802,819],[72,73,74,75,79,80,83],"p",{},"When tools like ",[76,77,78],"code",{},"createOrUpdateFile"," or ",[76,81,82],{},"mergePullRequest"," create commits, you can control how those commits are attributed. This is useful for AI agents, bots, and automated workflows where you want clear accountability.",[85,86,88],"h2",{"id":87},"ai-assistant-prompt-commit-attribution","AI assistant prompt (commit attribution)",[90,91,97],"pre",{"className":92,"code":93,"filename":94,"language":95,"meta":96,"style":96},"language-txt shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","Configure commit attribution in this @github-tools\u002Fsdk project: use coAuthors on createGithubTools or createGithubAgent to credit the bot or AI assistant on commits while keeping the human user as the primary author. See https:\u002F\u002Fgithub-tools.com\u002Fguide\u002Fcommit-attribution.\n","Prompt","txt","",[76,98,99],{"__ignoreMap":96},[100,101,104],"span",{"class":102,"line":103},"line",1,[100,105,93],{},[85,107,109],{"id":108},"understanding-git-attribution","Understanding Git attribution",[72,111,112],{},"Git tracks three types of attribution on commits:",[114,115,116,132],"table",{},[117,118,119],"thead",{},[120,121,122,126,129],"tr",{},[123,124,125],"th",{},"Role",[123,127,128],{},"Description",[123,130,131],{},"Set by",[133,134,135,153,168],"tbody",{},[120,136,137,144,147],{},[138,139,140],"td",{},[141,142,143],"strong",{},"Author",[138,145,146],{},"The person who wrote the code",[138,148,149,152],{},[76,150,151],{},"author"," option or authenticated user",[120,154,155,160,163],{},[138,156,157],{},[141,158,159],{},"Committer",[138,161,162],{},"The person who applied the commit",[138,164,165,152],{},[76,166,167],{},"committer",[120,169,170,175,178],{},[138,171,172],{},[141,173,174],{},"Co-author",[138,176,177],{},"Additional contributors",[138,179,180,183],{},[76,181,182],{},"Co-authored-by"," trailer in commit message",[72,185,186],{},"When using GitHub's API (which this SDK does), the default author and committer is the authenticated user (the owner of the token).",[85,188,190],{"id":189},"add-co-authors-to-commits","Add co-authors to commits",[72,192,193],{},"The most common pattern is keeping the human as author while crediting a bot or AI assistant as co-author:",[90,195,200],{"className":196,"code":197,"filename":198,"language":199,"meta":96,"style":96},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { createGithubTools } from '@github-tools\u002Fsdk'\n\nconst tools = createGithubTools({\n  token: userToken,\n  coAuthors: [\n    { name: 'my-bot[bot]', email: '12345+my-bot[bot]@users.noreply.github.com' }\n  ]\n})\n","co-authors.ts","ts",[76,201,202,232,239,261,277,288,325,331],{"__ignoreMap":96},[100,203,204,208,212,216,219,222,225,229],{"class":102,"line":103},[100,205,207],{"class":206},"s7zQu","import",[100,209,211],{"class":210},"sMK4o"," {",[100,213,215],{"class":214},"sTEyZ"," createGithubTools",[100,217,218],{"class":210}," }",[100,220,221],{"class":206}," from",[100,223,224],{"class":210}," '",[100,226,228],{"class":227},"sfazB","@github-tools\u002Fsdk",[100,230,231],{"class":210},"'\n",[100,233,235],{"class":102,"line":234},2,[100,236,238],{"emptyLinePlaceholder":237},true,"\n",[100,240,242,246,249,252,255,258],{"class":102,"line":241},3,[100,243,245],{"class":244},"spNyl","const",[100,247,248],{"class":214}," tools ",[100,250,251],{"class":210},"=",[100,253,215],{"class":254},"s2Zo4",[100,256,257],{"class":214},"(",[100,259,260],{"class":210},"{\n",[100,262,264,268,271,274],{"class":102,"line":263},4,[100,265,267],{"class":266},"swJcz","  token",[100,269,270],{"class":210},":",[100,272,273],{"class":214}," userToken",[100,275,276],{"class":210},",\n",[100,278,280,283,285],{"class":102,"line":279},5,[100,281,282],{"class":266},"  coAuthors",[100,284,270],{"class":210},[100,286,287],{"class":214}," [\n",[100,289,291,294,297,299,301,304,307,310,313,315,317,320,322],{"class":102,"line":290},6,[100,292,293],{"class":210},"    {",[100,295,296],{"class":266}," name",[100,298,270],{"class":210},[100,300,224],{"class":210},[100,302,303],{"class":227},"my-bot[bot]",[100,305,306],{"class":210},"'",[100,308,309],{"class":210},",",[100,311,312],{"class":266}," email",[100,314,270],{"class":210},[100,316,224],{"class":210},[100,318,319],{"class":227},"12345+my-bot[bot]@users.noreply.github.com",[100,321,306],{"class":210},[100,323,324],{"class":210}," }\n",[100,326,328],{"class":102,"line":327},7,[100,329,330],{"class":214},"  ]\n",[100,332,334,337],{"class":102,"line":333},8,[100,335,336],{"class":210},"}",[100,338,339],{"class":214},")\n",[72,341,342,343,345],{},"This appends a ",[76,344,182],{}," trailer to every commit message:",[90,347,350],{"className":92,"code":348,"filename":349,"language":95,"meta":96,"style":96},"Update README.md\n\nCo-authored-by: my-bot[bot] \u003C12345+my-bot[bot]@users.noreply.github.com>\n","commit-message.txt",[76,351,352,357,361],{"__ignoreMap":96},[100,353,354],{"class":102,"line":103},[100,355,356],{},"Update README.md\n",[100,358,359],{"class":102,"line":234},[100,360,238],{"emptyLinePlaceholder":237},[100,362,363],{"class":102,"line":241},[100,364,365],{},"Co-authored-by: my-bot[bot] \u003C12345+my-bot[bot]@users.noreply.github.com>\n",[72,367,368],{},"GitHub recognizes these trailers and displays co-authors in the commit UI.",[85,370,372],{"id":371},"override-author-and-committer","Override author and committer",[72,374,375],{},"You can also override the author and committer identity:",[90,377,380],{"className":196,"code":378,"filename":379,"language":199,"meta":96,"style":96},"import { createGithubTools } from '@github-tools\u002Fsdk'\n\nconst tools = createGithubTools({\n  token: botToken,\n  author: { name: 'Jane Doe', email: 'jane@example.com' },\n  committer: { name: 'my-bot[bot]', email: '12345+my-bot[bot]@users.noreply.github.com' }\n})\n","author-override.ts",[76,381,382,400,404,418,429,465,498],{"__ignoreMap":96},[100,383,384,386,388,390,392,394,396,398],{"class":102,"line":103},[100,385,207],{"class":206},[100,387,211],{"class":210},[100,389,215],{"class":214},[100,391,218],{"class":210},[100,393,221],{"class":206},[100,395,224],{"class":210},[100,397,228],{"class":227},[100,399,231],{"class":210},[100,401,402],{"class":102,"line":234},[100,403,238],{"emptyLinePlaceholder":237},[100,405,406,408,410,412,414,416],{"class":102,"line":241},[100,407,245],{"class":244},[100,409,248],{"class":214},[100,411,251],{"class":210},[100,413,215],{"class":254},[100,415,257],{"class":214},[100,417,260],{"class":210},[100,419,420,422,424,427],{"class":102,"line":263},[100,421,267],{"class":266},[100,423,270],{"class":210},[100,425,426],{"class":214}," botToken",[100,428,276],{"class":210},[100,430,431,434,436,438,440,442,444,447,449,451,453,455,457,460,462],{"class":102,"line":279},[100,432,433],{"class":266},"  author",[100,435,270],{"class":210},[100,437,211],{"class":210},[100,439,296],{"class":266},[100,441,270],{"class":210},[100,443,224],{"class":210},[100,445,446],{"class":227},"Jane Doe",[100,448,306],{"class":210},[100,450,309],{"class":210},[100,452,312],{"class":266},[100,454,270],{"class":210},[100,456,224],{"class":210},[100,458,459],{"class":227},"jane@example.com",[100,461,306],{"class":210},[100,463,464],{"class":210}," },\n",[100,466,467,470,472,474,476,478,480,482,484,486,488,490,492,494,496],{"class":102,"line":290},[100,468,469],{"class":266},"  committer",[100,471,270],{"class":210},[100,473,211],{"class":210},[100,475,296],{"class":266},[100,477,270],{"class":210},[100,479,224],{"class":210},[100,481,303],{"class":227},[100,483,306],{"class":210},[100,485,309],{"class":210},[100,487,312],{"class":266},[100,489,270],{"class":210},[100,491,224],{"class":210},[100,493,319],{"class":227},[100,495,306],{"class":210},[100,497,324],{"class":210},[100,499,500,502],{"class":102,"line":327},[100,501,336],{"class":210},[100,503,339],{"class":214},[505,506,507],"warning",{},"The GitHub API has restrictions on author\u002Fcommitter overrides. The token owner must have push access, and some organizations restrict which identities can be used.",[85,509,511],{"id":510},"use-with-agents","Use with agents",[72,513,514,515,518,519,270],{},"The same options work with ",[76,516,517],{},"createGithubAgent"," and ",[76,520,521],{},"createDurableGithubAgent",[90,523,526],{"className":196,"code":524,"filename":525,"language":199,"meta":96,"style":96},"import { createGithubAgent } from '@github-tools\u002Fsdk'\n\nconst agent = createGithubAgent({\n  model: 'anthropic\u002Fclaude-sonnet-4.6',\n  preset: 'maintainer',\n  coAuthors: [\n    { name: 'my-bot[bot]', email: '12345+my-bot[bot]@users.noreply.github.com' }\n  ]\n})\n","agent-attribution.ts",[76,527,528,547,551,566,582,598,606,634,638],{"__ignoreMap":96},[100,529,530,532,534,537,539,541,543,545],{"class":102,"line":103},[100,531,207],{"class":206},[100,533,211],{"class":210},[100,535,536],{"class":214}," createGithubAgent",[100,538,218],{"class":210},[100,540,221],{"class":206},[100,542,224],{"class":210},[100,544,228],{"class":227},[100,546,231],{"class":210},[100,548,549],{"class":102,"line":234},[100,550,238],{"emptyLinePlaceholder":237},[100,552,553,555,558,560,562,564],{"class":102,"line":241},[100,554,245],{"class":244},[100,556,557],{"class":214}," agent ",[100,559,251],{"class":210},[100,561,536],{"class":254},[100,563,257],{"class":214},[100,565,260],{"class":210},[100,567,568,571,573,575,578,580],{"class":102,"line":263},[100,569,570],{"class":266},"  model",[100,572,270],{"class":210},[100,574,224],{"class":210},[100,576,577],{"class":227},"anthropic\u002Fclaude-sonnet-4.6",[100,579,306],{"class":210},[100,581,276],{"class":210},[100,583,584,587,589,591,594,596],{"class":102,"line":279},[100,585,586],{"class":266},"  preset",[100,588,270],{"class":210},[100,590,224],{"class":210},[100,592,593],{"class":227},"maintainer",[100,595,306],{"class":210},[100,597,276],{"class":210},[100,599,600,602,604],{"class":102,"line":290},[100,601,282],{"class":266},[100,603,270],{"class":210},[100,605,287],{"class":214},[100,607,608,610,612,614,616,618,620,622,624,626,628,630,632],{"class":102,"line":327},[100,609,293],{"class":210},[100,611,296],{"class":266},[100,613,270],{"class":210},[100,615,224],{"class":210},[100,617,303],{"class":227},[100,619,306],{"class":210},[100,621,309],{"class":210},[100,623,312],{"class":266},[100,625,270],{"class":210},[100,627,224],{"class":210},[100,629,319],{"class":227},[100,631,306],{"class":210},[100,633,324],{"class":210},[100,635,636],{"class":102,"line":333},[100,637,330],{"class":214},[100,639,641,643],{"class":102,"line":640},9,[100,642,336],{"class":210},[100,644,339],{"class":214},[85,646,648],{"id":647},"commit-signing","Commit signing",[72,650,651,652,655,656,659],{},"The SDK automatically attempts to create ",[141,653,654],{},"signed commits"," using GitHub's ",[76,657,658],{},"createCommitOnBranch"," GraphQL mutation. Whether commits are actually signed depends on your token type:",[114,661,662,672],{},[117,663,664],{},[120,665,666,669],{},[123,667,668],{},"Token Type",[123,670,671],{},"Commits Signed?",[133,673,674,682,692,700],{},[120,675,676,679],{},[138,677,678],{},"GitHub App installation token",[138,680,681],{},"Yes",[120,683,684,690],{},[138,685,686,689],{},[76,687,688],{},"GITHUB_TOKEN"," (Actions)",[138,691,681],{},[120,693,694,697],{},[138,695,696],{},"User OAuth token",[138,698,699],{},"No",[120,701,702,705],{},[138,703,704],{},"Personal Access Token (PAT)",[138,706,699],{},[72,708,709],{},"Signed commits show as \"Verified\" in the GitHub UI and satisfy branch protection rules requiring signed commits.",[711,712,713,714,79,716,718],"note",{},"If you set a custom ",[76,715,151],{},[76,717,167],{},", the SDK uses the REST API instead of GraphQL, and commits will not be signed. Co-authors work with both methods.",[720,721,723],"h3",{"id":722},"why-some-tokens-dont-produce-signed-commits","Why some tokens don't produce signed commits",[72,725,726],{},"GitHub only signs commits made by bots (GitHub Apps). When you authenticate as a user (OAuth or PAT), GitHub cannot sign on your behalf because it doesn't have access to your private signing key. The commit still works—it just won't be marked as \"Verified.\"",[72,728,729,730,737],{},"For more details, see ",[731,732,736],"a",{"href":733,"rel":734},"https:\u002F\u002Fdocs.github.com\u002Fen\u002Fauthentication\u002Fmanaging-commit-signature-verification\u002Fabout-commit-signature-verification",[735],"nofollow","GitHub's commit signature verification docs",".",[85,739,741],{"id":740},"attribution-patterns","Attribution patterns",[114,743,744,757],{},[117,745,746],{},[120,747,748,751,753,755],{},[123,749,750],{},"Scenario",[123,752,143],{},[123,754,159],{},[123,756,174],{},[133,758,759,772,786],{},[120,760,761,764,767,769],{},[138,762,763],{},"Human using AI assistant",[138,765,766],{},"Human (default)",[138,768,766],{},[138,770,771],{},"Bot",[120,773,774,777,780,783],{},[138,775,776],{},"Bot acting on behalf of user",[138,778,779],{},"Human (override)",[138,781,782],{},"Bot (override)",[138,784,785],{},"—",[120,787,788,791,794,796],{},[138,789,790],{},"Fully automated CI",[138,792,793],{},"Bot (default)",[138,795,793],{},[138,797,785],{},[85,799,801],{"id":800},"external-references","External references",[803,804,805,813],"ul",{},[806,807,808],"li",{},[731,809,812],{"href":810,"rel":811},"https:\u002F\u002Fdocs.github.com\u002Fen\u002Fpull-requests\u002Fcommitting-changes-to-your-project\u002Fcreating-and-editing-commits\u002Fcreating-a-commit-with-multiple-authors",[735],"GitHub: Creating a commit with multiple authors",[806,814,815],{},[731,816,818],{"href":733,"rel":817},[735],"GitHub: About commit signature verification",[820,821,822],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}",{"title":96,"searchDepth":234,"depth":234,"links":824},[825,826,827,828,829,830,833,834],{"id":87,"depth":234,"text":88},{"id":108,"depth":234,"text":109},{"id":189,"depth":234,"text":190},{"id":371,"depth":234,"text":372},{"id":510,"depth":234,"text":511},{"id":647,"depth":234,"text":648,"children":831},[832],{"id":722,"depth":241,"text":723},{"id":740,"depth":234,"text":741},{"id":800,"depth":234,"text":801},"Configure author, committer, and co-authorship for commits created by GitHub tools.","md",[838],{"label":839},"API reference",{"0":841,"icon":842,"to":44,"color":843,"variant":844},null,"i-lucide-key-round","neutral","subtle",{"title":39,"description":835},"TOP5Gnjql-I6d_xzt5UF_jc0v9UpDa_6acR4U6-FWF4",[848,850],{"title":35,"path":36,"stem":37,"description":849,"children":-1},"Gate dangerous operations with human approval policies.",{"title":43,"path":44,"stem":45,"description":851,"children":-1},"Map GitHub token permissions to each preset and tool family.",1779365451999]