<commit_before>export function oauthUrl ({ repos, returnTo }) {
  // eslint-disable-next-line no-restricted-globals
  let { hostname, protocol, port } = location
  if (hostname === 'localhost') { port = 3001 }
  let params = [];
  if (repos && repos.length) { params.push(`repos=${JSON.stringify([...repos].reverse())}`); }
  if (returnTo) { params.push(`returnTo=${returnTo}`)}
  params = params.join('&')
  return `${protocol}//${hostname}${port && ':' + port}/api/oauth/start${params && '?' + params}`
}<commit_msg>fix(client): base oauth link on NODE_ENV<commit_after>export function oauthUrl ({ repos, returnTo }) {
  // eslint-disable-next-line no-restricted-globals
  let { hostname, protocol, port } = location
  if (process.env.NODE_ENV === 'development' && port === 3000) { port = 3001 }
  let params = [];
  if (repos && repos.length) { params.push(`repos=${JSON.stringify([...repos].reverse())}`); }
  if (returnTo) { params.push(`returnTo=${returnTo}`)}
  params = params.join('&')
  return `${protocol}//${hostname}${port && ':' + port}/api/oauth/start${params && '?' + params}`
}
{'fraction_non_alphanumeric': 0.21937842778793418, 'fraction_numerical': 0.010968921389396709, 'mean_word_length': 4.53030303030303, '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': '7631424', 'n_tokens_mistral': 375, 'n_tokens_neox': 359, 'n_words': 71}