<commit_before>extends layout

block content
  if (err)
    .announcement.err
        .announcement-inner
          if (err == 'invalid_formulae')
            | Invalid score formulae provided. Please rewrite it.
    .spacer

  #menu
    #idea-desc
      #idea-desc-top
        #idea-desc-top-title= challenge.name

      .spacer
      #idea-description-right
        #description-stats
          #description-stats-left
            .description-stats-score= challenge.created
            = " created "
          #description-stats-separator= "|"
          #description-stats-right
            .description-stats-score= challenge.merged
            = " merged "
          #description-stats-bottom
            p= challenge.users.length + " users"
        #description-logo
          img(src='#{challenge.logo}', width='150px', max-height='300px')

      #idea-description
        p!= challenge.description_mk

      #idea-desc-buttom
        - if (challenge.status == 'closed')
          h4 This challenge has ended.
        - else if (!user)
          a(href='/login?rf=join')
            input.btn.btn-success(type='submit', value='Join challenge')
        - else if (user && !user.joined)
          a(href='/challenges/' + challenge.link + '/join')
            input.btn.btn-success(type='submit', value='Join challenge')
        - else
          input.btn.btn-success(type='submit', value='Joined', disabled)
        - if (user && user.admin)
          a(href='/challenges/' + challenge.link + '/admin')
            input.btn.btn-success(type='submit', value='Edit challenge')
          a(href='/challenges/' + challenge.link + '/refresh')
            input.btn.btn-success(type='submit', value='Refresh')

  #content
    .left
      - if (currentUrl == '/challenges/' + challenge.link)
        h2 Repositories
        - if (challenge.repos.length)
          - for (var r=0; r<challenge.repos.length; r++)
            .ch-repo
              .profile-repo-icon-forked
              .ch-pull-info= "created " + challenge.created_no[r] + " -- merged " + challenge.merged_no[r]
              a(href='http://github.com/' + challenge.repos[r])= challenge.repos[r]
          .ch-pull-info= "* Fork the project and contribute now."
        - else
          p There are no repos set for this challenge.
        .spacer

        h2 Time
        - if (challenge.start_f && challenge.end_f)
          p= "Challenge starts on "
            b= challenge.start_f
            = " and ends on "
            b= challenge.end_f
            = ". Make sure you submit your pull requests on time."
          p= "Last refresh date: " + (challenge.refresh? challenge.refresh : 'N/A')
        - else
          | Time interval not set.
        .spacer

        h2 About
        - if (challenge.about)
          p!= challenge.about_mk
        - else
          | No other information about this repo or organisation.
        .spacer

        h2 Contact
        - if (!challenge.email)
          | No contact infomation provided.
        - else
          = "Use "
          b= challenge.email
          = " to get in contact with the organizers."

      - if (currentUrl == '/challenges/' + challenge.link + '/pulls')
        h2 Pull requests
        - if (pulls.length == 0)
          p There are no pull requests created yet.
        - else
          - each p in pulls
            - if (!p.hide || (user && user.admin))
              .ch-pull

                a(href='/#{p.auth}')= p.auth
                .ch-pull-info= "#" + p.repo
                br
                a(href='#{p.url}')= p.title
                - if (p.merged)
                  .ch-pull-info= "Merged on " + p.merged.toString().substr(3,12)
                - else
                  .ch-pull-info= "Created on " + p.created.toString().substr(3,12)

                p= "Files changed: " + p.files_changed + "    "
                  = "Lines inserted: " + p.lines_inserted + "    "
                  = "Lines removed: " + p.lines_removed + "    "
                  = "Rating: " + p.rating

                - if (challenge.display_scores)
                  .ch-pull-info= "POINTS:" + p.score

                - if (user && user.admin)
                  form(method='post', action='/challenges/' + challenge.link + '/rate?id=' + p._id)
                    - if (p.hide)
                      a(href='/challenges/' + challenge.link + '/display_commit?id=' + p._id)
                        input.btn.btn-warning(type='submit', value='Hidden')
                    - else
                      a(href='/challenges/' + challenge.link + '/hide_commit?id=' + p._id)
                        input.btn.btn-success(type='submit', value='Displayed')
<commit_msg>Keep points under same paragraph with statistics<commit_after>extends layout

block content
  if (err)
    .announcement.err
        .announcement-inner
          if (err == 'invalid_formulae')
            | Invalid score formulae provided. Please rewrite it.
    .spacer

  #menu
    #idea-desc
      #idea-desc-top
        #idea-desc-top-title= challenge.name

      .spacer
      #idea-description-right
        #description-stats
          #description-stats-left
            .description-stats-score= challenge.created
            = " created "
          #description-stats-separator= "|"
          #description-stats-right
            .description-stats-score= challenge.merged
            = " merged "
          #description-stats-bottom
            p= challenge.users.length + " users"
        #description-logo
          img(src='#{challenge.logo}', width='150px', max-height='300px')

      #idea-description
        p!= challenge.description_mk

      #idea-desc-buttom
        - if (challenge.status == 'closed')
          h4 This challenge has ended.
        - else if (!user)
          a(href='/login?rf=join')
            input.btn.btn-success(type='submit', value='Join challenge')
        - else if (user && !user.joined)
          a(href='/challenges/' + challenge.link + '/join')
            input.btn.btn-success(type='submit', value='Join challenge')
        - else
          input.btn.btn-success(type='submit', value='Joined', disabled)
        - if (user && user.admin)
          a(href='/challenges/' + challenge.link + '/admin')
            input.btn.btn-success(type='submit', value='Edit challenge')
          a(href='/challenges/' + challenge.link + '/refresh')
            input.btn.btn-success(type='submit', value='Refresh')

  #content
    .left
      - if (currentUrl == '/challenges/' + challenge.link)
        h2 Repositories
        - if (challenge.repos.length)
          - for (var r=0; r<challenge.repos.length; r++)
            .ch-repo
              .profile-repo-icon-forked
              .ch-pull-info= "created " + challenge.created_no[r] + " -- merged " + challenge.merged_no[r]
              a(href='http://github.com/' + challenge.repos[r])= challenge.repos[r]
          .ch-pull-info= "* Fork the project and contribute now."
        - else
          p There are no repos set for this challenge.
        .spacer

        h2 Time
        - if (challenge.start_f && challenge.end_f)
          p= "Challenge starts on "
            b= challenge.start_f
            = " and ends on "
            b= challenge.end_f
            = ". Make sure you submit your pull requests on time."
          p= "Last refresh date: " + (challenge.refresh? challenge.refresh : 'N/A')
        - else
          | Time interval not set.
        .spacer

        h2 About
        - if (challenge.about)
          p!= challenge.about_mk
        - else
          | No other information about this repo or organisation.
        .spacer

        h2 Contact
        - if (!challenge.email)
          | No contact information provided.
        - else
          = "Use "
          b= challenge.email
          = " to get in contact with the organizers."

      - if (currentUrl == '/challenges/' + challenge.link + '/pulls')
        h2 Pull requests
        - if (pulls.length == 0)
          p There are no pull requests created yet.
        - else
          - each p in pulls
            - if (!p.hide || (user && user.admin))
              .ch-pull

                a(href='/#{p.auth}')= p.auth
                .ch-pull-info= "#" + p.repo
                br
                a(href='#{p.url}')= p.title
                - if (p.merged)
                  .ch-pull-info= "Merged on " + p.merged.toString().substr(3,12)
                - else
                  .ch-pull-info= "Created on " + p.created.toString().substr(3,12)

                p= "Files changed: " + p.files_changed + "    "
                  = "Lines inserted: " + p.lines_inserted + "    "
                  = "Lines removed: " + p.lines_removed + "    "
                  = "Rating: " + p.rating

                  - if (challenge.display_scores)
                    .ch-pull-info= "POINTS:" + p.score

                - if (user && user.admin)
                  form(method='post', action='/challenges/' + challenge.link + '/rate?id=' + p._id)
                    - if (p.hide)
                      a(href='/challenges/' + challenge.link + '/display_commit?id=' + p._id)
                        input.btn.btn-warning(type='submit', value='Hidden')
                    - else
                      a(href='/challenges/' + challenge.link + '/hide_commit?id=' + p._id)
                        input.btn.btn-success(type='submit', value='Displayed')

{'fraction_non_alphanumeric': 0.1337295690936107, 'fraction_numerical': 0.004245383145828911, 'mean_word_length': 1.540576974925856, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '2931651', 'n_tokens_mistral': 2807, 'n_tokens_neox': 2632, 'n_words': 594}