[{"data":1,"prerenderedAt":1203},["ShallowReactive",2],{"page:\u002Fdocs\u002F5.x\u002Fintegrations\u002Fgitlab":3},{"id":4,"title":5,"body":6,"description":1187,"extension":1188,"frontmatter":1189,"heading":5,"meta":1195,"navigation":1196,"order":1191,"path":1197,"seo":1198,"sitemap":1199,"source":1200,"stem":1201,"__hash__":1202},"docs\u002Fdocs\u002F5.x\u002Fintegrations\u002Fgitlab.md","Publish Kubb snapshots with GitLab CI",{"type":7,"value":8,"toc":1176},"minimark",[9,30,35,85],[10,11,12,13,17,18,21,22,25,26,29],"p",{},"Publish an installable Kubb Studio snapshot from GitLab CI so reviewers can compare generated files against the target branch and previous pipelines. Store ",[14,15,16],"code",{},"KUBB_TOKEN"," as a masked CI\u002FCD variable, commit your npm lockfile, and keep ",[14,19,20],{},"kubb"," and ",[14,23,24],{},"tsdown"," in the development dependencies so ",[14,27,28],{},"npm ci"," installs the CLI.",[31,32,34],"h2",{"id":33},"prerequisites","Prerequisites",[36,37,38,52,66],"ul",{},[39,40,41,42,45,46,51],"li",{},"A repository with a working ",[14,43,44],{},"kubb.config.ts"," on Kubb 5.6.2 or later. Follow ",[47,48,50],"a",{"href":49},"\u002Fdocs\u002F5.x\u002Fhow-to\u002Finstallation","Installation"," if you have not set up Kubb.",[39,53,54,55,59,60,62,63,65],{},"A ",[47,56,58],{"href":57},"\u002Fdocs\u002F5.x\u002Fintegrations\u002Fstudio","Kubb Studio"," organization and an organization CI API key, stored as ",[14,61,16],{}," in a secret only trusted pipelines can read. Snapshot installation uses a separate registry key. Create both in Studio under Settings › Developers › Tokens, with type CI for ",[14,64,16],{}," and type Registry for installs.",[39,67,68,70,71,73,74,76,77,80,81,84],{},[14,69,24],{}," in the development dependencies, next to ",[14,72,20],{},", so ",[14,75,28],{}," installs it. A snapshot builds its ",[14,78,79],{},"dist"," files with it, and Kubb does not install it by default: ",[14,82,83],{},"npm i -D tsdown",".",[86,87,89,93,96,208,222,227,234,1100,1137,1153,1157,1173],"steps",{"level":88},"2",[31,90,92],{"id":91},"configure-the-job","Configure the job",[10,94,95],{},"Add this job:",[97,98,103],"pre",{"language":99,"filename":100,"code":101,"class":102},"yaml",".gitlab-ci.yml","snapshot:\n  stage: build\n  image: node:22\n  script:\n    - npm ci\n    - npx kubb studio snapshot\n  rules:\n    - if: $CI_MERGE_REQUEST_IID\n    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH","highlights",[14,104,106,119,120,119,135,119,147,119,156,119,163,119,174,119,183,119,195],{"class":105},"language-yaml",[107,108,111,115],"span",{"class":109,"style":110},"line","display: inline",[107,112,114],{"style":113},"color:#005cc5;--hls-dark:#79b8ff","snapshot",[107,116,118],{"style":117},"color:#d73a49;--hls-dark:#f97583",":","\n",[107,121,122,125,128,131],{"class":109,"style":110},[107,123,124],{"style":117},"  ",[107,126,127],{"style":113},"stage",[107,129,130],{"style":117},": ",[107,132,134],{"style":133},"color:#032f62;--hls-dark:#9ecbff","build",[107,136,137,139,142,144],{"class":109,"style":110},[107,138,124],{"style":133},[107,140,141],{"style":113},"image",[107,143,130],{"style":117},[107,145,146],{"style":133},"node:22",[107,148,149,151,154],{"class":109,"style":110},[107,150,124],{"style":133},[107,152,153],{"style":113},"script",[107,155,118],{"style":117},[107,157,158,161],{"class":109,"style":110},[107,159,160],{"style":117},"    - ",[107,162,28],{"style":133},[107,164,165,168,171],{"class":109,"style":110},[107,166,167],{"style":133},"    ",[107,169,170],{"style":117},"- ",[107,172,173],{"style":133},"npx kubb studio snapshot",[107,175,176,178,181],{"class":109,"style":110},[107,177,124],{"style":133},[107,179,180],{"style":113},"rules",[107,182,118],{"style":117},[107,184,185,187,190,192],{"class":109,"style":110},[107,186,160],{"style":117},[107,188,189],{"style":113},"if",[107,191,130],{"style":117},[107,193,194],{"style":133},"$CI_MERGE_REQUEST_IID",[107,196,197,199,201,203,205],{"class":109,"style":110},[107,198,167],{"style":133},[107,200,170],{"style":117},[107,202,189],{"style":113},[107,204,130],{"style":117},[107,206,207],{"style":133},"$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH",[10,209,210,211,21,213,215,216,218,219,221],{},"With ",[14,212,20],{},[14,214,24],{}," in the development dependencies, ",[14,217,28],{}," is the only setup. The ",[14,220,180],{}," run the job on merge request pipelines and on the default branch, so a merge request has a snapshot of its target branch to compare with.",[223,224,226],"h3",{"id":225},"post-the-result-as-a-note","Post the result as a note",[10,228,229,230,233],{},"Use ",[14,231,232],{},"--json"," to capture the snapshot result, then post it as a merge request note with this script. It updates the same note on each pipeline and uses only Node:",[97,235,239],{"language":236,"filename":237,"code":238,"class":102},"js","scripts\u002Fkubb-note.mjs","import { readFileSync } from 'node:fs'\n\nconst snapshot = JSON.parse(readFileSync('snapshot.json', 'utf8'))\nconst marker = '\u003C!-- kubb-snapshot -->'\nconst counts = (c) => `${c.added.length} added · ${c.changed.length} changed · ${c.removed.length} removed`\nconst lines = [marker, `Kubb snapshot: \\`npm i ${snapshot.url}\\``]\n\nconst { branchChanges: branch, changes } = snapshot\nif (branch) {\n  if (branch.base) lines.push(`Changes against \\`${branch.branch}\\`: ${counts(branch)}`)\n  else if (branch.baseFound) lines.push(`No snapshot of \\`${branch.branch}\\` for this package yet`)\n  else lines.push(`No snapshot of \\`${branch.branch}\\` to compare with`)\n}\nif (changes?.base) lines.push(`Changes since ${changes.base.commit?.slice(0, 7) ?? changes.base.createdAt}: ${counts(changes)}`)\n\nconst { CI_API_V4_URL, CI_PROJECT_ID, CI_MERGE_REQUEST_IID, GITLAB_API_TOKEN } = process.env\nconst notes = `${CI_API_V4_URL}\u002Fprojects\u002F${CI_PROJECT_ID}\u002Fmerge_requests\u002F${CI_MERGE_REQUEST_IID}\u002Fnotes`\nconst headers = { 'PRIVATE-TOKEN': GITLAB_API_TOKEN, 'Content-Type': 'application\u002Fjson' }\nconst existing = (await (await fetch(`${notes}?per_page=100`, { headers })).json()).find((note) => note.body.startsWith(marker))\nconst response = await fetch(existing ? `${notes}\u002F${existing.id}` : notes, {\n  method: existing ? 'PUT' : 'POST',\n  headers,\n  body: JSON.stringify({ body: lines.join('\\n\\n') }),\n})\nif (!response.ok) throw new Error(`GitLab answered ${response.status}`)",[14,240,242,119,263,119,265,119,305,119,317,119,397,119,441,119,443,119,468,119,480,119,544,119,592,119,628,119,632,119,723,119,725,119,761,119,799,119,830,119,915,119,970,119,994,119,1003,119,1047,119,1052],{"class":241},"language-js",[107,243,244,247,250,254,257,260],{"class":109,"style":110},[107,245,246],{"style":117},"import ",[107,248,249],{"style":113},"{ ",[107,251,253],{"style":252},"color:#24292e;--hls-dark:#e1e4e8","readFileSync ",[107,255,256],{"style":113},"} ",[107,258,259],{"style":117},"from ",[107,261,262],{"style":133},"'node:fs'",[107,264],{"class":109,"style":110},[107,266,267,270,273,276,279,281,285,288,291,293,296,299,302],{"class":109,"style":110},[107,268,269],{"style":117},"const ",[107,271,272],{"style":252},"snapshot ",[107,274,275],{"style":117},"= ",[107,277,278],{"style":113},"JSON",[107,280,84],{"style":117},[107,282,284],{"style":283},"color:#6f42c1;--hls-dark:#b392f0","parse",[107,286,287],{"style":113},"(",[107,289,290],{"style":283},"readFileSync",[107,292,287],{"style":113},[107,294,295],{"style":133},"'snapshot.json'",[107,297,298],{"style":117},", ",[107,300,301],{"style":133},"'utf8'",[107,303,304],{"style":113},"))",[107,306,307,309,312,314],{"class":109,"style":110},[107,308,269],{"style":117},[107,310,311],{"style":252},"marker ",[107,313,275],{"style":117},[107,315,316],{"style":133},"'\u003C!-- kubb-snapshot -->'",[107,318,319,321,324,326,328,331,334,337,340,343,345,347,350,352,355,358,361,363,365,367,370,372,374,376,379,381,383,385,388,390,392,394],{"class":109,"style":110},[107,320,269],{"style":117},[107,322,323],{"style":252},"counts ",[107,325,275],{"style":117},[107,327,287],{"style":113},[107,329,330],{"style":252},"c",[107,332,333],{"style":113},") ",[107,335,336],{"style":117},"=> ",[107,338,339],{"style":133},"`",[107,341,342],{"style":252},"${",[107,344,330],{"style":252},[107,346,84],{"style":117},[107,348,349],{"style":113},"added",[107,351,84],{"style":117},[107,353,354],{"style":113},"length",[107,356,357],{"style":252},"}",[107,359,360],{"style":133}," added · ",[107,362,342],{"style":252},[107,364,330],{"style":252},[107,366,84],{"style":117},[107,368,369],{"style":113},"changed",[107,371,84],{"style":117},[107,373,354],{"style":113},[107,375,357],{"style":252},[107,377,378],{"style":133}," changed · ",[107,380,342],{"style":252},[107,382,330],{"style":252},[107,384,84],{"style":117},[107,386,387],{"style":113},"removed",[107,389,84],{"style":117},[107,391,354],{"style":113},[107,393,357],{"style":252},[107,395,396],{"style":133}," removed`",[107,398,399,401,404,406,409,412,414,417,420,423,425,427,429,432,434,436,438],{"class":109,"style":110},[107,400,269],{"style":117},[107,402,403],{"style":252},"lines ",[107,405,275],{"style":117},[107,407,408],{"style":113},"[",[107,410,411],{"style":252},"marker",[107,413,298],{"style":117},[107,415,416],{"style":133},"`Kubb snapshot: ",[107,418,419],{"style":133},"\\`",[107,421,422],{"style":133},"npm i ",[107,424,342],{"style":252},[107,426,114],{"style":252},[107,428,84],{"style":117},[107,430,431],{"style":113},"url",[107,433,357],{"style":252},[107,435,419],{"style":133},[107,437,339],{"style":133},[107,439,440],{"style":113},"]",[107,442],{"class":109,"style":110},[107,444,445,447,449,452,454,457,459,462,464,466],{"class":109,"style":110},[107,446,269],{"style":117},[107,448,249],{"style":113},[107,450,451],{"style":113},"branchChanges",[107,453,130],{"style":117},[107,455,456],{"style":252},"branch",[107,458,298],{"style":117},[107,460,461],{"style":252},"changes ",[107,463,256],{"style":113},[107,465,275],{"style":117},[107,467,114],{"style":252},[107,469,470,473,475,477],{"class":109,"style":110},[107,471,472],{"style":117},"if ",[107,474,287],{"style":113},[107,476,456],{"style":252},[107,478,479],{"style":113},") {",[107,481,482,484,486,488,490,492,495,497,500,502,505,507,510,512,514,516,518,520,522,524,526,528,531,533,535,538,540,542],{"class":109,"style":110},[107,483,124],{"style":113},[107,485,472],{"style":117},[107,487,287],{"style":113},[107,489,456],{"style":252},[107,491,84],{"style":117},[107,493,494],{"style":113},"base",[107,496,333],{"style":113},[107,498,499],{"style":252},"lines",[107,501,84],{"style":117},[107,503,504],{"style":283},"push",[107,506,287],{"style":113},[107,508,509],{"style":133},"`Changes against ",[107,511,419],{"style":133},[107,513,342],{"style":252},[107,515,456],{"style":252},[107,517,84],{"style":117},[107,519,456],{"style":113},[107,521,357],{"style":252},[107,523,419],{"style":133},[107,525,130],{"style":133},[107,527,342],{"style":252},[107,529,530],{"style":283},"counts",[107,532,287],{"style":113},[107,534,456],{"style":252},[107,536,537],{"style":113},")",[107,539,357],{"style":252},[107,541,339],{"style":133},[107,543,537],{"style":113},[107,545,546,548,551,553,555,557,560,562,564,566,568,570,573,575,577,579,581,583,585,587,590],{"class":109,"style":110},[107,547,124],{"style":113},[107,549,550],{"style":117},"else if ",[107,552,287],{"style":113},[107,554,456],{"style":252},[107,556,84],{"style":117},[107,558,559],{"style":113},"baseFound",[107,561,333],{"style":113},[107,563,499],{"style":252},[107,565,84],{"style":117},[107,567,504],{"style":283},[107,569,287],{"style":113},[107,571,572],{"style":133},"`No snapshot of ",[107,574,419],{"style":133},[107,576,342],{"style":252},[107,578,456],{"style":252},[107,580,84],{"style":117},[107,582,456],{"style":113},[107,584,357],{"style":252},[107,586,419],{"style":133},[107,588,589],{"style":133}," for this package yet`",[107,591,537],{"style":113},[107,593,594,596,599,601,603,605,607,609,611,613,615,617,619,621,623,626],{"class":109,"style":110},[107,595,124],{"style":113},[107,597,598],{"style":117},"else ",[107,600,499],{"style":252},[107,602,84],{"style":117},[107,604,504],{"style":283},[107,606,287],{"style":113},[107,608,572],{"style":133},[107,610,419],{"style":133},[107,612,342],{"style":252},[107,614,456],{"style":252},[107,616,84],{"style":117},[107,618,456],{"style":113},[107,620,357],{"style":252},[107,622,419],{"style":133},[107,624,625],{"style":133}," to compare with`",[107,627,537],{"style":113},[107,629,630],{"class":109,"style":110},[107,631,357],{"style":113},[107,633,634,636,638,641,644,646,648,650,652,654,656,659,661,663,665,667,669,672,674,677,679,682,684,687,689,692,694,696,698,700,703,705,707,709,711,713,715,717,719,721],{"class":109,"style":110},[107,635,472],{"style":117},[107,637,287],{"style":113},[107,639,640],{"style":252},"changes",[107,642,643],{"style":117},"?.",[107,645,494],{"style":113},[107,647,333],{"style":113},[107,649,499],{"style":252},[107,651,84],{"style":117},[107,653,504],{"style":283},[107,655,287],{"style":113},[107,657,658],{"style":133},"`Changes since ",[107,660,342],{"style":252},[107,662,640],{"style":252},[107,664,84],{"style":117},[107,666,494],{"style":113},[107,668,84],{"style":117},[107,670,671],{"style":113},"commit",[107,673,643],{"style":117},[107,675,676],{"style":283},"slice",[107,678,287],{"style":113},[107,680,681],{"style":113},"0",[107,683,298],{"style":117},[107,685,686],{"style":113},"7",[107,688,333],{"style":113},[107,690,691],{"style":117},"?? ",[107,693,640],{"style":252},[107,695,84],{"style":117},[107,697,494],{"style":113},[107,699,84],{"style":117},[107,701,702],{"style":113},"createdAt",[107,704,357],{"style":252},[107,706,130],{"style":133},[107,708,342],{"style":252},[107,710,530],{"style":283},[107,712,287],{"style":113},[107,714,640],{"style":252},[107,716,537],{"style":113},[107,718,357],{"style":252},[107,720,339],{"style":133},[107,722,537],{"style":113},[107,724],{"class":109,"style":110},[107,726,727,729,731,734,736,739,741,744,746,749,751,753,756,758],{"class":109,"style":110},[107,728,269],{"style":117},[107,730,249],{"style":113},[107,732,733],{"style":113},"CI_API_V4_URL",[107,735,298],{"style":117},[107,737,738],{"style":113},"CI_PROJECT_ID",[107,740,298],{"style":117},[107,742,743],{"style":113},"CI_MERGE_REQUEST_IID",[107,745,298],{"style":117},[107,747,748],{"style":113},"GITLAB_API_TOKEN ",[107,750,256],{"style":113},[107,752,275],{"style":117},[107,754,755],{"style":252},"process",[107,757,84],{"style":117},[107,759,760],{"style":113},"env",[107,762,763,765,768,770,772,774,776,778,781,783,785,787,790,792,794,796],{"class":109,"style":110},[107,764,269],{"style":117},[107,766,767],{"style":252},"notes ",[107,769,275],{"style":117},[107,771,339],{"style":133},[107,773,342],{"style":252},[107,775,733],{"style":113},[107,777,357],{"style":252},[107,779,780],{"style":133},"\u002Fprojects\u002F",[107,782,342],{"style":252},[107,784,738],{"style":113},[107,786,357],{"style":252},[107,788,789],{"style":133},"\u002Fmerge_requests\u002F",[107,791,342],{"style":252},[107,793,743],{"style":113},[107,795,357],{"style":252},[107,797,798],{"style":133},"\u002Fnotes`",[107,800,801,803,806,808,810,813,815,818,820,823,825,828],{"class":109,"style":110},[107,802,269],{"style":117},[107,804,805],{"style":252},"headers ",[107,807,275],{"style":117},[107,809,249],{"style":113},[107,811,812],{"style":133},"'PRIVATE-TOKEN'",[107,814,130],{"style":117},[107,816,817],{"style":113},"GITLAB_API_TOKEN",[107,819,298],{"style":117},[107,821,822],{"style":133},"'Content-Type'",[107,824,130],{"style":117},[107,826,827],{"style":133},"'application\u002Fjson' ",[107,829,357],{"style":113},[107,831,832,834,837,839,841,844,846,848,851,853,855,857,860,862,865,867,869,871,874,876,879,882,884,887,890,893,895,897,899,901,904,906,909,911,913],{"class":109,"style":110},[107,833,269],{"style":117},[107,835,836],{"style":252},"existing ",[107,838,275],{"style":117},[107,840,287],{"style":113},[107,842,843],{"style":117},"await ",[107,845,287],{"style":113},[107,847,843],{"style":117},[107,849,850],{"style":283},"fetch",[107,852,287],{"style":113},[107,854,339],{"style":133},[107,856,342],{"style":252},[107,858,859],{"style":252},"notes",[107,861,357],{"style":252},[107,863,864],{"style":133},"?per_page=100`",[107,866,298],{"style":117},[107,868,249],{"style":113},[107,870,805],{"style":252},[107,872,873],{"style":113},"}))",[107,875,84],{"style":117},[107,877,878],{"style":283},"json",[107,880,881],{"style":113},"())",[107,883,84],{"style":117},[107,885,886],{"style":283},"find",[107,888,889],{"style":113},"((",[107,891,892],{"style":252},"note",[107,894,333],{"style":113},[107,896,336],{"style":117},[107,898,892],{"style":252},[107,900,84],{"style":117},[107,902,903],{"style":113},"body",[107,905,84],{"style":117},[107,907,908],{"style":283},"startsWith",[107,910,287],{"style":113},[107,912,411],{"style":252},[107,914,304],{"style":113},[107,916,917,919,922,924,926,928,930,932,935,937,939,941,943,946,948,951,953,956,958,961,963,965,967],{"class":109,"style":110},[107,918,269],{"style":117},[107,920,921],{"style":252},"response ",[107,923,275],{"style":117},[107,925,843],{"style":117},[107,927,850],{"style":283},[107,929,287],{"style":113},[107,931,836],{"style":252},[107,933,934],{"style":117},"? ",[107,936,339],{"style":133},[107,938,342],{"style":252},[107,940,859],{"style":252},[107,942,357],{"style":252},[107,944,945],{"style":133},"\u002F",[107,947,342],{"style":252},[107,949,950],{"style":252},"existing",[107,952,84],{"style":117},[107,954,955],{"style":113},"id",[107,957,357],{"style":252},[107,959,960],{"style":133},"` ",[107,962,130],{"style":117},[107,964,859],{"style":252},[107,966,298],{"style":117},[107,968,969],{"style":113},"{",[107,971,972,974,977,979,981,983,986,988,991],{"class":109,"style":110},[107,973,124],{"style":113},[107,975,976],{"style":113},"method",[107,978,130],{"style":117},[107,980,836],{"style":252},[107,982,934],{"style":117},[107,984,985],{"style":133},"'PUT' ",[107,987,130],{"style":117},[107,989,990],{"style":133},"'POST'",[107,992,993],{"style":117},",",[107,995,996,998,1001],{"class":109,"style":110},[107,997,124],{"style":117},[107,999,1000],{"style":252},"headers",[107,1002,993],{"style":117},[107,1004,1005,1007,1009,1011,1013,1015,1018,1021,1023,1025,1027,1029,1032,1034,1037,1040,1042,1045],{"class":109,"style":110},[107,1006,124],{"style":117},[107,1008,903],{"style":113},[107,1010,130],{"style":117},[107,1012,278],{"style":113},[107,1014,84],{"style":117},[107,1016,1017],{"style":283},"stringify",[107,1019,1020],{"style":113},"({ ",[107,1022,903],{"style":113},[107,1024,130],{"style":117},[107,1026,499],{"style":252},[107,1028,84],{"style":117},[107,1030,1031],{"style":283},"join",[107,1033,287],{"style":113},[107,1035,1036],{"style":133},"'",[107,1038,1039],{"style":133},"\\n\\n",[107,1041,1036],{"style":133},[107,1043,1044],{"style":113},") })",[107,1046,993],{"style":117},[107,1048,1049],{"class":109,"style":110},[107,1050,1051],{"style":113},"})",[107,1053,1054,1056,1058,1061,1064,1066,1069,1071,1074,1077,1080,1082,1085,1087,1089,1091,1094,1096,1098],{"class":109,"style":110},[107,1055,472],{"style":117},[107,1057,287],{"style":113},[107,1059,1060],{"style":117},"!",[107,1062,1063],{"style":252},"response",[107,1065,84],{"style":117},[107,1067,1068],{"style":113},"ok",[107,1070,333],{"style":113},[107,1072,1073],{"style":117},"throw ",[107,1075,1076],{"style":117},"new ",[107,1078,1079],{"style":283},"Error",[107,1081,287],{"style":113},[107,1083,1084],{"style":133},"`GitLab answered ",[107,1086,342],{"style":252},[107,1088,1063],{"style":252},[107,1090,84],{"style":117},[107,1092,1093],{"style":113},"status",[107,1095,357],{"style":252},[107,1097,339],{"style":133},[107,1099,537],{"style":113},[97,1101,1103],{"language":99,"filename":100,"code":1102,"class":102},"  script:\n    - npm ci\n    - npx kubb studio snapshot --json > snapshot.json\n    - '[ -z \"$CI_MERGE_REQUEST_IID\" ] || node scripts\u002Fkubb-note.mjs'",[14,1104,1105,119,1113,119,1119,119,1128],{"class":105},[107,1106,1107,1109,1111],{"class":109,"style":110},[107,1108,124],{"style":252},[107,1110,153],{"style":113},[107,1112,118],{"style":117},[107,1114,1115,1117],{"class":109,"style":110},[107,1116,160],{"style":117},[107,1118,28],{"style":133},[107,1120,1121,1123,1125],{"class":109,"style":110},[107,1122,167],{"style":133},[107,1124,170],{"style":117},[107,1126,1127],{"style":133},"npx kubb studio snapshot --json > snapshot.json",[107,1129,1130,1132,1134],{"class":109,"style":110},[107,1131,167],{"style":133},[107,1133,170],{"style":117},[107,1135,1136],{"style":133},"'[ -z \"$CI_MERGE_REQUEST_IID\" ] || node scripts\u002Fkubb-note.mjs'",[1138,1139,1141,1142,1145,1146,1148,1149,1152],"blockquote",{"as":1140},"important","Writing a note needs a project access token with the ",[14,1143,1144],{},"api"," scope, stored as ",[14,1147,817],{},". ",[14,1150,1151],{},"CI_JOB_TOKEN"," does not carry it.",[31,1154,1156],{"id":1155},"review-and-install-the-result","Review and install the result",[10,1158,1159,1160,1163,1164,21,1166,1168,1169,84],{},"Studio has no diff view for snapshots. The GitHub Action lists the changed generated files in its pull request comment, and ",[14,1161,1162],{},"kubb studio snapshot --json"," reports them in ",[14,1165,640],{},[14,1167,451],{}," with any provider. To consume the generated package, follow ",[47,1170,1172],{"href":1171},"\u002Fdocs\u002F5.x\u002Fintegrations\u002Fci#install-the-snapshot","Install the snapshot",[1138,1174,1175],{"as":892},"Snapshots expire after seven days. Schedule a default-branch run if it can go a week without a push.",{"title":1177,"searchDepth":1178,"depth":1178,"links":1179},"",5,[1180,1182,1186],{"id":33,"depth":1181,"text":34},2,{"id":91,"depth":1181,"text":92,"children":1183},[1184],{"id":225,"depth":1185,"text":226},3,{"id":1155,"depth":1181,"text":1156},"Add a GitLab CI job that runs kubb studio snapshot on each merge request and compares the generated files with the target branch and the previous pipeline.","md",{"layout":1190,"title":5,"description":1187,"order":1191,"navigation":1192},"doc",4,{"title":1193,"icon":1194},"GitLab CI","i-simple-icons-gitlab",{"layout":1190},{"title":1193,"icon":1194},"\u002Fdocs\u002F5.x\u002Fintegrations\u002Fgitlab",{"title":5,"description":1187},{"loc":1197},"kubb-labs\u002Fkubb\u002Fdocs\u002F5.x\u002Fintegrations\u002Fgitlab.md","docs\u002F5.x\u002Fintegrations\u002Fgitlab","U3J5Y7vQSevf1ezPwmsW4smWQK6Hhsjtt34_lpPrRfE",1792931641344]