<commit_before><dom-module id="feedback-section">
  <style>
    paper-checkbox.red {
      --paper-checkbox-checked-color: #D50000; 
    }

    paper-checkbox.green {
      --paper-checkbox-checked-color: #4CAF50; 
    }

    paper-checkbox.pink {
      --paper-checkbox-checked-color: #E91E63; 
    }

    paper-checkbox.purple {
      --paper-checkbox-checked-color: #AB47BC; 
    }

    paper-checkbox.blue {
      --paper-checkbox-checked-color: #0D47A1; 
    }

    paper-checkbox.light-blue {
      --paper-checkbox-checked-color: #03A9F4; 
    }

    paper-button {
      margin-top: 10px;
    }

    paper-button.green {
      color: #4CAF50;
    }
  </style>
  <template>
  	<paper-material>
        <paper-item>Feedback</paper-item>
        <paper-input id="issueTitle" label="Titel" value="{{body.title}}"></paper-input>
        <paper-textarea id="issueBody" label="Body" value="{{body.body}}"></paper-textarea>
        <paper-item>Wähle alle passende Labels aus:</paper-item>
        <paper-checkbox id="bug" class="red" value="bug">Bug</paper-checkbox>
        <paper-checkbox id="help" class="green" value="help">Hilfe</paper-checkbox>
        <paper-checkbox id="question" class="pink" value="question">Frage</paper-checkbox>
        <paper-checkbox id="feature" class="purple" value="feature">Feature</paper-checkbox>
        <paper-checkbox id="enhancement" class="blue" value="enhancement">Verbesserung</paper-checkbox>
        <paper-checkbox id="design" class="light-blue" value="design">Design Vorschlag</paper-checkbox>
        <paper-button class="green ripple" on-tap="submitIssue" raised>Absenden</paper-button>
    </paper-material>
  	<iron-ajax
      id="githubIssues"
  		url="https://api.github.com/repos/IchordeDionysos/social-contacts/issues"
  		method="POST"
  		body="[[body]]"
      params='{"access_token": "<KEY>"}'
      verbose
      content-type="application/json"
      handle-as="json"
  		on-response="showSuccess">

  	</iron-ajax>
  </template>
  <script>
    Polymer({
      is: 'feedback-section',

      properties : {
      	body: {
      		notify: true,
      		type: Object,
          value: {
            "title": "",
            "body": "",
            "assignee": "IchordeDionysos",
            "labels": ["0 - Backlog"]
          }
      	}
      },

      showSuccess: function () {
      	document.querySelector('#issueCreated').show();
        this.body.labels = ["0 - Backlog"];
        //this.body.title = "";
        this.$.issueTitle.value = "";
        this.$.issueBody.value = "";
        //this.body.body = "";
        this.$.bug.checked = false;
        this.$.help.checked = false;
        this.$.question.checked = false;
        this.$.feature.checked = false;
        this.$.enhancement.checked = false;
        this.$.design.checked = false;

        console.log(this.body.title);
        console.log(this.body.body);
        console.log(this.body.labels);
      },

      submitIssue: function() {
        if (this.$.bug.checked) {
          this.push('body.labels', 'bug');
        };
        if (this.$.help.checked) {
          this.push('body.labels', 'help');
        };
        if (this.$.question.checked) {
          this.push('body.labels', 'question');
        };
        if (this.$.feature.checked) {
          this.push('body.labels', 'feature');
        };
        if (this.$.enhancement.checked) {
          this.push('body.labels', 'enhancement');
        };
        if (this.$.design.checked) {
          this.push('body.labels', 'design');
        };
        console.log(this.body);
        this.$.githubIssues.generateRequest();
      }

    });
  </script>
</dom-module><commit_msg>Added email field to feedback section<commit_after><dom-module id="feedback-section">
  <style>
    paper-checkbox.red {
      --paper-checkbox-checked-color: #D50000; 
    }

    paper-checkbox.green {
      --paper-checkbox-checked-color: #4CAF50; 
    }

    paper-checkbox.pink {
      --paper-checkbox-checked-color: #E91E63; 
    }

    paper-checkbox.purple {
      --paper-checkbox-checked-color: #AB47BC; 
    }

    paper-checkbox.blue {
      --paper-checkbox-checked-color: #0D47A1; 
    }

    paper-checkbox.light-blue {
      --paper-checkbox-checked-color: #03A9F4; 
    }

    paper-button {
      margin-top: 10px;
    }

    paper-button.green {
      color: #4CAF50;
    }
  </style>
  <template>
  	<paper-material>
        <paper-item>Feedback</paper-item>
        <paper-input id="issueTitle" label="Titel" value="{{body.title}}"></paper-input>
        <paper-input id="issueEmail" label="Email (notwendig zur Kontaktaufnahme)" value="{{ghEmail}}"></paper-input>
        <paper-textarea id="issueBody" label="Body" value="{{ghBody}}"></paper-textarea>
        <paper-item>Wähle alle passende Labels aus:</paper-item>
        <paper-checkbox id="bug" class="red" value="bug">Bug</paper-checkbox>
        <paper-checkbox id="help" class="green" value="help">Hilfe</paper-checkbox>
        <paper-checkbox id="question" class="pink" value="question">Frage</paper-checkbox>
        <paper-checkbox id="feature" class="purple" value="feature">Feature</paper-checkbox>
        <paper-checkbox id="enhancement" class="blue" value="enhancement">Verbesserung</paper-checkbox>
        <paper-checkbox id="design" class="light-blue" value="design">Design Vorschlag</paper-checkbox>
        <paper-button class="green ripple" on-tap="submitIssue" raised>Absenden</paper-button>
    </paper-material>
  	<iron-ajax
      id="githubIssues"
  		url="https://api.github.com/repos/IchordeDionysos/social-contacts/issues"
  		method="POST"
  		body="[[body]]"
      params='{"access_token": "<KEY>"}'
      verbose
      content-type="application/json"
      handle-as="json"
  		on-response="showSuccess">

  	</iron-ajax>
  </template>
  <script>
    Polymer({
      is: 'feedback-section',

      properties : {
      	body: {
      		notify: true,
      		type: Object,
          value: {
            "title": "",
            "body": "",
            "assignee": "IchordeDionysos",
            "labels": ["0 - Backlog"]
          },

          ghBody: {
            notify: true,
            type: String,
            value: ""
          },

          ghEmail: {
            notify: true,
            type: String,
            value: ""
          }
      	}
      },

      showSuccess: function () {
      	document.querySelector('#issueCreated').show();
        this.body.labels = ["0 - Backlog"];
        //this.body.title = "";
        this.$.issueTitle.value = "";
        this.$.issueEmail.value = "";
        this.$.issueBody.value = "";
        //this.body.body = "";
        this.$.bug.checked = false;
        this.$.help.checked = false;
        this.$.question.checked = false;
        this.$.feature.checked = false;
        this.$.enhancement.checked = false;
        this.$.design.checked = false;

        console.log(this.body.title);
        console.log(this.body.body);
        console.log(this.body.labels);
      },

      submitIssue: function() {
        if (this.$.bug.checked) {
          this.push('body.labels', 'bug');
        };
        if (this.$.help.checked) {
          this.push('body.labels', 'help');
        };
        if (this.$.question.checked) {
          this.push('body.labels', 'question');
        };
        if (this.$.feature.checked) {
          this.push('body.labels', 'feature');
        };
        if (this.$.enhancement.checked) {
          this.push('body.labels', 'enhancement');
        };
        if (this.$.design.checked) {
          this.push('body.labels', 'design');
        };

        var body = this.ghBody + "\n" + "Email: " + this.ghEmail;

        this.set('body.body', body);

        console.log(this.body);
        this.$.githubIssues.generateRequest();
      }

    });
  </script>
</dom-module>
{'fraction_non_alphanumeric': 0.17222929936305734, 'fraction_numerical': 0.007388535031847133, 'mean_word_length': 2.153012048192771, 'pattern_counts': {'":': 10, '<': 75, '<?xml version=': 0, '>': 75, 'https://': 2, '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': '5707817', 'n_tokens_mistral': 2548, 'n_tokens_neox': 2447, 'n_words': 354}