<commit_before>import React from 'react';

import {t} from 'app/locale';
import AsyncView from 'app/views/asyncView';
import BreadcrumbTitle from 'app/views/settings/components/settingsBreadcrumb/breadcrumbTitle';
import Form from 'app/views/settings/components/forms/form';
import IntegrationItem from 'app/views/organizationIntegrations/integrationItem';
import JsonForm from 'app/views/settings/components/forms/jsonForm';
import SettingsPageHeader from 'app/views/settings/components/settingsPageHeader';

class ProjectIntegration extends AsyncView {
  getEndpoints() {
    const {orgId, projectId, integrationId} = this.props.params;

    return [
      ['integration', `/projects/${orgId}/${projectId}/integrations/${integrationId}/`],
    ];
  }

  getTitle() {
    return this.state.integration ? this.state.integration.name : 'Configure Integration';
  }

  renderBody() {
    const {orgId, projectId} = this.props.params;
    const {integration} = this.state;

    const title = <IntegrationItem integration={integration} withProvider={true} />;

    return (
      <React.Fragment>
        <BreadcrumbTitle routes={this.props.routes} title={integration.name} />
        <SettingsPageHeader noTitleStyles title={title} />

        {integration.configProject.length > 0 && (
          <Form
            hideFooter={true}
            saveOnBlur={true}
            allowUndo={true}
            apiMethod="POST"
            initialData={integration.configData}
            apiEndpoint={`/projects/${orgId}/${projectId}/integrations/${
              integration.id
            }/`}
          >
            <JsonForm
              fields={integration.configProject}
              title={t('Integration Project Settings')}
            />
          </Form><commit_msg>fix(integrations): withProvider is not a thing<commit_after>import React from 'react';

import {t} from 'app/locale';
import AsyncView from 'app/views/asyncView';
import BreadcrumbTitle from 'app/views/settings/components/settingsBreadcrumb/breadcrumbTitle';
import Form from 'app/views/settings/components/forms/form';
import IntegrationItem from 'app/views/organizationIntegrations/integrationItem';
import JsonForm from 'app/views/settings/components/forms/jsonForm';
import SettingsPageHeader from 'app/views/settings/components/settingsPageHeader';

class ProjectIntegration extends AsyncView {
  getEndpoints() {
    const {orgId, projectId, integrationId} = this.props.params;

    return [
      ['integration', `/projects/${orgId}/${projectId}/integrations/${integrationId}/`],
    ];
  }

  getTitle() {
    return this.state.integration ? this.state.integration.name : 'Configure Integration';
  }

  renderBody() {
    const {orgId, projectId} = this.props.params;
    const {integration} = this.state;

    const title = <IntegrationItem integration={integration} />;

    return (
      <React.Fragment>
        <BreadcrumbTitle routes={this.props.routes} title={integration.name} />
        <SettingsPageHeader noTitleStyles title={title} />

        {integration.configProject.length > 0 && (
          <Form
            hideFooter={true}
            saveOnBlur={true}
            allowUndo={true}
            apiMethod="POST"
            initialData={integration.configData}
            apiEndpoint={`/projects/${orgId}/${projectId}/integrations/${
              integration.id
            }/`}
          >
            <JsonForm
              fields={integration.configProject}
              title={t('Integration Project Settings')}
            />
          </Form>
{'fraction_non_alphanumeric': 0.12271320011258091, 'fraction_numerical': 0.0005629045876723895, 'mean_word_length': 3.0340522133938705, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2372697', 'n_tokens_mistral': 985, 'n_tokens_neox': 952, 'n_words': 179}