<commit_before><form role="form" id="addonSettings${addon_short_name.capitalize()}" data-addon="${addon_short_name}">

    <div>
        <h4 class="addon-title">
            GitHub
            <small class="authorized-by">
                % if node_has_auth:
                        authorized by
                        <a href="${auth_osf_url}" target="_blank">
                            ${auth_osf_name}
                        </a>
                    % if not is_registration:
                        <a id="githubRemoveToken" class="text-danger pull-right addon-auth" >Deauthorize</a>
                    % endif
                % else:
                    % if user_has_auth:
                        <a id="githubImportToken" class="text-primary pull-right addon-auth">
                            Import Access Token
                        </a>
                    % else:
                        <a id="githubCreateToken" class="text-primary pull-right addon-auth">
                            Create Access Token
                        </a>
                    % endif
                % endif
            </small>
        </h4>
    </div>

    % if node_has_auth and valid_credentials:

        <input type="hidden" id="githubUser" name="github_user" value="${github_user}" />
        <input type="hidden" id="githubRepo" name="github_repo" value="${github_repo}" />

        <p><strong>Current Repo:</strong></p>

        <div class="row">

            <div class="col-md-6">
                <select id="githubSelectRepo" class="form-control" ${'disabled' if not is_owner or is_registration else ''}>
                    <option>-----</option>
                        % if is_owner:
                            % for repo_name in repo_names:
                                <option value="${repo_name}" ${'selected' if repo_name == github_repo_full_name else ''}>${repo_name}</option>
                            % endfor
                        % else:
                            <option selected>${github_repo_full_name}</option>
                        % endif
                </select>
            </div>

            % if is_owner and not is_registration:
                <div class="col-md-6">
                    <a id="githubCreateRepo" class="btn btn-default">Create Repo</a>
                    <button class="btn btn-primary addon-settings-submit pull-right">
                        Submit
                    </button>
                </div>
            % endif

        </div>

    % endif

    ${self.on_submit()}

    % if node_has_auth and not valid_credentials:
        <div class="addon-settings-message text-danger" style="padding-top: 10px;">
            % if is_owner:
                Could not retrieve GitHub settings at this time. The GitHub addon credentials
                may no longer be valid. Try deauthorizing and reauthorizing GitHub on your
                <a href="${addons_url}">account settings page</a>.
            % else:
                Could not retrieve GitHub settings at this time. The GitHuh addon credentials
                may no longer be valid. Contact ${auth_osf_name} to verify.
            % endif
        </div>
    % else:
        <div class="addon-settings-message" style="display: none; padding-top: 10px;"></div>
    % endif

</form>

<%def name="on_submit()">
    <script type="text/javascript">
        window.contextVars = $.extend({}, window.contextVars, {'githubSettingsSelector': '#addonSettings${addon_short_name.capitalize()}'});
    </script>
</%def><commit_msg>Fix typo<commit_after><form role="form" id="addonSettings${addon_short_name.capitalize()}" data-addon="${addon_short_name}">

    <div>
        <h4 class="addon-title">
            GitHub
            <small class="authorized-by">
                % if node_has_auth:
                        authorized by
                        <a href="${auth_osf_url}" target="_blank">
                            ${auth_osf_name}
                        </a>
                    % if not is_registration:
                        <a id="githubRemoveToken" class="text-danger pull-right addon-auth" >Deauthorize</a>
                    % endif
                % else:
                    % if user_has_auth:
                        <a id="githubImportToken" class="text-primary pull-right addon-auth">
                            Import Access Token
                        </a>
                    % else:
                        <a id="githubCreateToken" class="text-primary pull-right addon-auth">
                            Create Access Token
                        </a>
                    % endif
                % endif
            </small>
        </h4>
    </div>

    % if node_has_auth and valid_credentials:

        <input type="hidden" id="githubUser" name="github_user" value="${github_user}" />
        <input type="hidden" id="githubRepo" name="github_repo" value="${github_repo}" />

        <p><strong>Current Repo:</strong></p>

        <div class="row">

            <div class="col-md-6">
                <select id="githubSelectRepo" class="form-control" ${'disabled' if not is_owner or is_registration else ''}>
                    <option>-----</option>
                        % if is_owner:
                            % for repo_name in repo_names:
                                <option value="${repo_name}" ${'selected' if repo_name == github_repo_full_name else ''}>${repo_name}</option>
                            % endfor
                        % else:
                            <option selected>${github_repo_full_name}</option>
                        % endif
                </select>
            </div>

            % if is_owner and not is_registration:
                <div class="col-md-6">
                    <a id="githubCreateRepo" class="btn btn-default">Create Repo</a>
                    <button class="btn btn-primary addon-settings-submit pull-right">
                        Submit
                    </button>
                </div>
            % endif

        </div>

    % endif

    ${self.on_submit()}

    % if node_has_auth and not valid_credentials:
        <div class="addon-settings-message text-danger" style="padding-top: 10px;">
            % if is_owner:
                Could not retrieve GitHub settings at this time. The GitHub addon credentials
                may no longer be valid. Try deauthorizing and reauthorizing GitHub on your
                <a href="${addons_url}">account settings page</a>.
            % else:
                Could not retrieve GitHub settings at this time. The GitHub addon credentials
                may no longer be valid. Contact ${auth_osf_name} to verify.
            % endif
        </div>
    % else:
        <div class="addon-settings-message" style="display: none; padding-top: 10px;"></div>
    % endif

</form>

<%def name="on_submit()">
    <script type="text/javascript">
        window.contextVars = $.extend({}, window.contextVars, {'githubSettingsSelector': '#addonSettings${addon_short_name.capitalize()}'});
    </script>
</%def>
{'fraction_non_alphanumeric': 0.11651854986598956, 'fraction_numerical': 0.002257017915079701, 'mean_word_length': 1.4652294853963839, 'pattern_counts': {'":': 0, '<': 103, '<?xml version=': 0, '>': 103, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4937210', 'n_tokens_mistral': 1923, 'n_tokens_neox': 1790, 'n_words': 432}