<commit_before>import React from 'react';
import Relay from 'react-relay';

import Navigation from './layout/Navigation';
import Footer from './layout/Footer';

class Main extends React.Component {
  static propTypes = {
    children: React.PropTypes.node.isRequired,
    viewer: React.PropTypes.object.isRequired,
    organization: React.PropTypes.object
  };

  render() {
    return (
      <div>
        <Navigation organization={this.props.organization} viewer={this.props.viewer} />
        {this.props.children}
        <Footer viewer={this.props.viewer} />
      </div>
    );
  }
}

export default Relay.createContainer(Main, {
  fragments: {
    viewer: () => Relay.QL`
      fragment on Viewer {
        user {
          name
          avatar {
            url
          }
        }
        organizations(first: 100) {
          edges {
            node {
              name
              slug
            }
          }
        }
        runningBuilds: builds(state: "running") {
          count
        }
        scheduledBuilds: builds(state: "scheduled") {
          count
        }
        unreadChangelogs: builds(read: false) {
          count
        }
      }
    `,
    organization: () => Relay.QL`
      fragment on Organization {
        id
        name
        slug
        agents {
          count
        }
	permissions {
	  organizationUpdate {
	    allowed
	  }
	  organizationMemberCreate {
	    allowed
	  }
	  notificationServiceUpdate {
	    allowed<commit_msg>Use BUILD_STATE_SCHEDULED and BUILD_STATE_RUNNING enums<commit_after>import React from 'react';
import Relay from 'react-relay';

import Navigation from './layout/Navigation';
import Footer from './layout/Footer';

class Main extends React.Component {
  static propTypes = {
    children: React.PropTypes.node.isRequired,
    viewer: React.PropTypes.object.isRequired,
    organization: React.PropTypes.object
  };

  render() {
    return (
      <div>
        <Navigation organization={this.props.organization} viewer={this.props.viewer} />
        {this.props.children}
        <Footer viewer={this.props.viewer} />
      </div>
    );
  }
}

export default Relay.createContainer(Main, {
  fragments: {
    viewer: () => Relay.QL`
      fragment on Viewer {
        user {
          name
          avatar {
            url
          }
        }
        organizations(first: 100) {
          edges {
            node {
              name
              slug
            }
          }
        }
        runningBuilds: builds(state: BUILD_STATE_RUNNING) {
          count
        }
        scheduledBuilds: builds(state: BUILD_STATE_SCHEDULED) {
          count
        }
        unreadChangelogs: changelogs(read: false) {
          count
        }
      }
    `,
    organization: () => Relay.QL`
      fragment on Organization {
        id
        name
        slug
        agents {
          count
        }
	permissions {
	  organizationUpdate {
	    allowed
	  }
	  organizationMemberCreate {
	    allowed
	  }
	  notificationServiceUpdate {
	    allowed
{'fraction_non_alphanumeric': 0.09501965923984272, 'fraction_numerical': 0.001965923984272608, 'mean_word_length': 1.6898678414096917, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 15, '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': '7183036', 'n_tokens_mistral': 887, 'n_tokens_neox': 860, 'n_words': 175}