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