function validate( opts, options ) {
	if ( !isObject( options ) ) {
		return new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );
	}
	if ( hasOwnProp( options, 'dir' ) ) {
		opts.dir = options.dir;
		if ( !isString( opts.dir ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'dir', opts.dir ) );
		}
	}
	if ( hasOwnProp( options, 'issueURL' ) ) {
		opts.issueURL = options.issueURL;
		if ( !isString( opts.issueURL ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'issueURL', opts.issueURL ) );
		}
	}
	if ( hasOwnProp( options, 'prURL' ) ) {
		opts.prURL = options.prURL;
		if ( !isString( opts.prURL ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'prURL', opts.prURL ) );
		}
	}
	if ( hasOwnProp( options, 'flags' ) ) {
		opts.flags = options.flags;
		if ( !isPlainObject( opts.flags ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be an object. Option: `%s`.', 'flags', opts.flags ) );
		}
	}
	return null;
}
Validates function options.

@private
@param {Object} opts - destination for validated options
@param {Options} options - function options
@param {string} [options.dir] - root directory
@param {string} [options.issueURL] - issue URL
@param {string} [options.prURL] - PR URL
@param {Options} [options.flags] - `git log` options
@returns {(null|Error)} null or an error