<commit_before>#!/bin/sh

OAUTH_TOKEN=$1
REPO_OWNER=$2
PROJECT_NAME=$3
TITLE=$(git log -1 --pretty=%B)
CURRENT_BRANCH=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,')

curl \
    -X POST \
    -H "Authorization: token $OAUTH_TOKEN" \
    -d@- \
    "https://api.github.com/repos/$REPO_OWNER/$PROJECT_NAME/pulls" <<EOF
{
  "title": "$TITLE",
  "head": "$CURRENT_BRANCH",
  "base": "master"
}
EOF<commit_msg>Added target branch to pull request script<commit_after>#!/bin/sh

OAUTH_TOKEN=$1
REPO_OWNER=$2
PROJECT_NAME=$3
TARGET_BRANCH=$4

if [ -z "$TARGET_BRANCH" ]
then
	TARGET_BRANCH="master"
fi

TITLE=$(git log -1 --pretty=%B)
CURRENT_BRANCH=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,')

curl \
    -X POST \
    -H "Authorization: token $OAUTH_TOKEN" \
    -d@- \
    "https://api.github.com/repos/$REPO_OWNER/$PROJECT_NAME/pulls" <<EOF
{
  "title": "$TITLE",
  "head": "$CURRENT_BRANCH",
  "base": "$TARGET_BRANCH"
}
EOF
{'fraction_non_alphanumeric': 0.21221864951768488, 'fraction_numerical': 0.011789924973204717, 'mean_word_length': 3.67, 'pattern_counts': {'":': 6, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '7609171', 'n_tokens_mistral': 416, 'n_tokens_neox': 399, 'n_words': 74}