<commit_before>from django.conf import settings
from django.shortcuts import render, redirect
from django import forms
from ci.oauth import OAuth
import requests
from django.contrib import messages

class GitLabAuth(OAuth):
  def __init__(self):
    self._prefix = 'gitlab_'
    self._token_key = 'gitlab_token'
    self._user_key = 'gitlab_user'
    self._state_key = 'gitlab_state' # not used
    self._client_id = settings.GITLAB_CLIENT_ID
    self._secret_id = settings.GITLAB_SECRET_ID
    self._server_type = settings.GITSERVER_GITLAB
    self._api_url = settings.GITLAB_API_URL
    #self._token_url = '{}/oauth/token'.format(self._api_url)
    self._token_url = '{}/api/v3/session'.format(self._api_url)
    self._auth_url = '{}/oauth/authorize'.format(self._api_url)
    self._user_url = '{}/user'.format(self._api_url)
    self._callback_user_key = 'username'
    self._scope = ''<commit_msg>We are not using GITLAB_CLIENT/SECRET_ID<commit_after>from django.conf import settings
from django.shortcuts import render, redirect
from django import forms
from ci.oauth import OAuth
import requests
from django.contrib import messages

class GitLabAuth(OAuth):
  def __init__(self):
    self._prefix = 'gitlab_'
    self._token_key = 'gitlab_token'
    self._user_key = 'gitlab_user'
    self._state_key = 'gitlab_state' # not used
    self._client_id = None
    self._secret_id = None
    self._server_type = settings.GITSERVER_GITLAB
    self._api_url = settings.GITLAB_API_URL
    #self._token_url = '{}/oauth/token'.format(self._api_url)
    self._token_url = '{}/api/v3/session'.format(self._api_url)
    self._auth_url = '{}/oauth/authorize'.format(self._api_url)
    self._user_url = '{}/user'.format(self._api_url)
    self._callback_user_key = 'username'
    self._scope = ''
{'fraction_non_alphanumeric': 0.11135982092893117, 'fraction_numerical': 0.001119194180190263, 'mean_word_length': 4.258823529411765, 'pattern_counts': {'":': 0, '<': 3, '<?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': '6466492', 'n_tokens_mistral': 611, 'n_tokens_neox': 608, 'n_words': 116}