<commit_before>'use strict'

const child_process = require('child_process')
const debug = require('debug')('attempt-backport')
const request = require('request')
const node_repo = require('../lib/node-repo')
const updatePrWithLabels = node_repo.updatePrWithLabels
// const removeLabelFromPR = node_repo.removeLabelFromPR

const enabledRepos = ['node']
const queue = []
let inProgress = false

module.exports = function (app) {
  if (!global._node_repo_dir) return

  app.on('pull_request.opened', handlePrUpdate)
  // Pull Request updates
  app.on('pull_request.synchronize', handlePrUpdate)

  function handlePrUpdate (event, owner, repo) {
    if (!~enabledRepos.indexOf(repo)) return

    if (event.pull_request.base.ref !== 'master') return

    const prId = event.number
    const options = { owner, repo, prId, logger: event.logger }

    debug(`/${owner}/${repo}/pull/${prId} sync`)
    queueAttemptBackport(options, 7, false)<commit_msg>attempt-backport: disable for now<commit_after>'use strict'

const child_process = require('child_process')
const debug = require('debug')('attempt-backport')
const request = require('request')
const node_repo = require('../lib/node-repo')
const updatePrWithLabels = node_repo.updatePrWithLabels
// const removeLabelFromPR = node_repo.removeLabelFromPR

const enabledRepos = ['node']
const queue = []
let inProgress = false

module.exports = function (app) {
  return
  if (!global._node_repo_dir) return

  app.on('pull_request.opened', handlePrUpdate)
  // Pull Request updates
  app.on('pull_request.synchronize', handlePrUpdate)

  function handlePrUpdate (event, owner, repo) {
    if (!~enabledRepos.indexOf(repo)) return

    if (event.pull_request.base.ref !== 'master') return

    const prId = event.number
    const options = { owner, repo, prId, logger: event.logger }

    debug(`/${owner}/${repo}/pull/${prId} sync`)
    queueAttemptBackport(options, 7, false)
{'fraction_non_alphanumeric': 0.1344450234497134, 'fraction_numerical': 0.0010422094841063053, 'mean_word_length': 4.962732919254658, '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': '4597128', 'n_tokens_mistral': 592, 'n_tokens_neox': 575, 'n_words': 139}