<commit_before>import React from 'dom-chef';
import select from 'select-dom';
import features from '../libs/features';
import getDefaultBranch from '../libs/get-default-branch';

async function init(): Promise<false | void> {
	const defaultBranch = await getDefaultBranch();
	// Expected: /user/repo/compare/master...user:master
	if (!location.pathname.endsWith(':' + defaultBranch)) {
		return false;
	}

	select('.gh-header-new-pr')!.append(
		<div className="flash flash-error my-3">
			<strong>Note:</strong> Creating a PR from the the default branch is an <a href="https://blog.jasonmeridth.com/posts/do-not-issue-pull-requests-from-your-master-branch/" target="_blank">anti-pattern</a>.
		</div>
	);
}

features.add({
	id: __featureName__,
	description: 'Warns you when creating a pull request from the default branch, as it’s an anti-pattern.',
	screenshot: 'https://user-images.githubusercontent.com/1402241/52543516-3ca94e00-2de5-11e9-9f80-ff8f9fe8bdc4.png',
	include: [
		features.isCompare
	],
	load: features.onAjaxedPages,
	init
});<commit_msg>Fix typo in `warn-pr-from-master` (#2485)<commit_after>import React from 'dom-chef';
import select from 'select-dom';
import features from '../libs/features';
import getDefaultBranch from '../libs/get-default-branch';

async function init(): Promise<false | void> {
	const defaultBranch = await getDefaultBranch();
	// Expected: /user/repo/compare/master...user:master
	if (!location.pathname.endsWith(':' + defaultBranch)) {
		return false;
	}

	select('.gh-header-new-pr')!.append(
		<div className="flash flash-error my-3">
			<strong>Note:</strong> Creating a PR from the default branch is an <a href="https://blog.jasonmeridth.com/posts/do-not-issue-pull-requests-from-your-master-branch/" target="_blank">anti-pattern</a>.
		</div>
	);
}

features.add({
	id: __featureName__,
	description: 'Warns you when creating a pull request from the default branch, as it’s an anti-pattern.',
	screenshot: 'https://user-images.githubusercontent.com/1402241/52543516-3ca94e00-2de5-11e9-9f80-ff8f9fe8bdc4.png',
	include: [
		features.isCompare
	],
	load: features.onAjaxedPages,
	init
});
{'fraction_non_alphanumeric': 0.15715622076707203, 'fraction_numerical': 0.03274087932647334, 'mean_word_length': 4.704, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 4, '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': '7544082', 'n_tokens_mistral': 767, 'n_tokens_neox': 726, 'n_words': 159}