PageSourceSearch

https://cloud.cypress.io/github-enterprise-form.fb7f44100e7072d8d671.bundle.js

js cypress.io collected 2026-10-01 07:24:03 UTC 5,663 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_frontend_dashboard=self.webpackChunk_frontend_dashboard||[]).push([[277],{97019:(e,r,t)=>{t.r(r),t.d(r,{GithubEnterpriseInstallationForm:()=>g,default:()=>m});t(1569),t(96656),t(95790),t(99180),t(21555),t(33111),t(94356),t(45993);var i=t(54756),n=t.n(i),a=(t(68989),t(10467)),s=t(31085),u=t(20467),l=t(14041),o=t(40893),p=t(79313),d=t(22689),c=t(38594),b=t(76093),f=t(66577),h=t(93954),v=t(19262),g=function(e){var r,t,i=e.orgId,g=(0,v.Zp)(),m=c.q.isEnabled("cross-origin-opener-policy-header"),I=(0,l.useState)(!1),E=I[0],y=I[1],x=(0,l.useState)(null),j=x[0],N=x[1],G=(0,h.n3m)({variables:{uuid:i}}),w=G.refetch,S=G.data,C=(0,h.psu)(),H=C[0],k=C[1],q=k.loading,A=k.error,R=(0,h.z7T)({variables:{input:{orgId:i}}})[0],K=(0,l.useCallback)(function(){m||(w().then(function(){return y(!0)}),R().then(function(e){var r;(null===(r=e.data)||void 0===r?void 0:r.githubEnterpriseFailedInstallationsCleanup)&&b.A.setNotification("There was an error creating the integration","failure")}))},[R,m,w]),z=(0,d.m)({destination:"/apps/github-enterprise/login/organization/"+i,onClose:K,height:900,width:1030}),U=z.openPopup,F=z.isLoading;((0,l.useEffect)(function(){!!(null==S?void 0:S.organization.githubAppEnterpriseInstallations.length)&&E&&g("/organizations/"+i+"/integrations/github-enterprise")},[i,S,E,g]),(0,l.useEffect)(function(){if(m){var e=window.location.origin,r=function(r){r.origin===e&&function(e){if(!e||"object"!=typeof e)return!1;var r=e;return("github-enterprise-install:success"===r.type||"github-enterprise-install:error"===r.type)&&"string"==typeof r.orgId&&"number"==typeof r.githubEnterpriseId}(r.data)&&r.data.orgId===i&&r.data.githubEnterpriseId===j&&(N(null),"github-enterprise-install:success"!==r.data.type?R().then(function(e){var r;(null===(r=e.data)||void 0===r?void 0:r.githubEnterpriseFailedInstallationsCleanup)&&b.A.setNotification("There was an error creating the integration","failure")}):w().then(function(){return y(!0)}))};return window.addEventListener("message",r),function(){window.removeEventListener("message",r)}}},[R,m,i,j,w]),A)&&("INTERNAL_SERVER_ERROR"===(null===(r=A.graphQLErrors[0])||void 0===r||null===(t=r.extensions)||void 0===t?void 0:t.code)&&b.A.setNotification("These credentials are already in use. Please create a new application in GitHub Enterprise.","failure"));var L={serverUrl:p.Yj().url("GitHub Enterprise server url must be a url").required("GitHub Enterprise server url is required"),appId:p.ai().required("GitHub Enterprise app ID is required"),appName:p.Yj().required("GitHub Enterprise app name is required"),privateKey:p.Yj().required("GitHub Enterprise private key is required"),clientId:p.Yj().required("GitHub Enterprise client ID is required"),clientSecret:p.Yj().required("GitHub Enterprise client secret is required")},T=p.Ik().shape(L);return(0,s.jsx)(o.l1,{validationSchema:T,onSubmit:function(e){var r,t=e.serverUrl,s=e.appId,u=e.appName,l=e.privateKey,o=e.clientId,p=e.clientSecret;if(!m)return H({variables:{input:{orgId:i,serverUrl:t,appId:Number(s),appName:u,privateKey:l,clientId:o,clientSecret:p}}}).then(function(){return U()});var d=new Set(null!=(r=null==S?void 0:S.organization.githubAppEnterpriseInstallations.map(function(e){return e.id}))?r:[]);return H({variables:{input:{orgId:i,serverUrl:t,appId:Number(s),appName:u,privateKey:l,clientId:o,clientSecret:p}}}).then(function(){var e=(0,a.A)(n().mark(function e(r){var t,i,a,s,u;return n().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(t=r.data)||void 0===t?void 0:t.githubEnterpriseIntegrationCreation){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,w();case 4:if(a=e.sent,s=a.data.organization.githubAppEnterpriseInstallations,u=null!=(i=s.find(function(e){var r=e.id;return!d.has(r)}))?i:s.at(-1)){e.next=10;break}return b.A.setNotification("There was an error creating the integration","failure"),e.abrupt("return");case 10:N(u.id),U();case 12:case"end":return e.stop()}},e)}));return function(r){return e.apply(this,arguments)}}())},initialValues:{serverUrl:"",appId:0,appName:"",privateKey:"",clientId:"",clientSecret:""},children:function(e){var r=e.isSubmitting,t=e.dirty,i=e.isValid,n=e.setFieldValue,a=e.values;return(0,s.jsxs)(o.lV,{children:[(0,s.jsx)(f.m7,{disabled:!1,editable:!0,name:"serverUrl",label:"GitHub Enterprise Server URL"}),(0,s.jsx)(f.m7,{disabled:!1,editable:!0,name:"appId",label:"GitHub Enterprise App ID"}),(0,s.jsx)(f.m7,{disabled:!1,editable:!0,name:"appName",label:"GitHub Enterprise App name"}),(0,s.jsx)(f.m7,{disabled:!1,editable:!0,name:"privateKey",label:"GitHub Enterprise Private key",
1inputGroupClassName:"fs-exclude",InputComponent:u.MJ,InputProps:{componentClass:"textarea","data-cy":"github-enterprise-private-key",rows:10,onChange:function(e){return n("privateKey",e.target.value)},value:a.privateKey}}),(0,s.jsx)(f.m7,{disabled:!1,editable:!0,name:"clientId",label:"GitHub Enterprise Client ID"}),(0,s.jsx)(f.m7,{disabled:!1,editable:!0,name:"clientSecret",label:"GitHub Enterprise Client secret",inputGroupClassName:"fs-exclude"}),(0,s.jsx)("hr",{}),(0,s.jsx)(u.Zk.Body,{children:(0,s.jsxs)(u.$n,{"data-cy":"form-submission",bsStyle:"primary",type:"submit",disabled:!i||!t||r||q||F,children:[r&&(0,s.jsxs)("span",{children:[(0,s.jsx)(u.In,{name:"refresh",className:"fa-spin"})," "]}),F?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.pR,{style:{marginRight:8},name:"status-loading",size:"x16",spin:!0}),"Waiting for you to configure integration..."]}):"Next Step"]})})]})}})};g.displayName="GithubEnterpriseInstallationForm";const m=g}}]);
2//# sourceMappingURL=github-enterprise-form.fb7f44100e7072d8d671.bundle.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.